merge-convert-csv-to-json
Merges all the csv files and converts it to json.
🚀 Features
- Merge all the
CSV
files and convert into singleJSON
file. - Merge all the
CSV
files, convert it toJSON
object, assign it to aJSON field
an then store it in aJSON
file. - Merge all the
CSV
files, convert it toJSON
with every object keyedBy aJSON
field and then store it to aJSON
file. - Merge all the
CSV
files, convert it toJSON
with every object keyedBy aJSON
field, assign the object to aJSON
field and then store it to aJSON
file. - Merge all the
CSV
files, convert into singleJSON
file by converting string values into map by providingkeyValueSplitter
,propertySplitter
,keyIndex
,valueIndex
,field
andpluginType
astransfromPropertyToMap
Installation
Using NPM
npm install -g merge-convert-csv-to-json
Using YARN
yarn add merge-convert-csv-to-json
Options
--pattern pattern The pattern of the input files to process.
--keyBy propertyName The name of the property to keyby.
--assignTo propertyName The name of the property to assign the result to.
--outputTo filePath The filepath to output the result to.
Usage
-
Merge all the
CSV
files and convert into singleJSON
file.merge-convert --pattern "/users/*.users.csv" --outputTo /users/merged.users.json
-
Merge all the
CSV
files, convert it toJSON
object, assign it to aJSON field
and then store it in aJSON
file.merge-convert --pattern "/users/*.users.csv" --assignTo users --outputTo /users/merged.users.json
-
Merge all the
CSV
files, convert it toJSON
with every object keyedBy aJSON
field and then store it to aJSON
file.merge-convert --pattern "/users/*.users.csv" --keyBy email --outputTo /users/merged.users.json
-
Merge all the
CSV
files, convert it toJSON
with every object keyedBy aJSON
field, assign the object to aJSON
field and then store it to aJSON
file.merge-convert --pattern "/users/*.users.csv" --keyBy email --assignTo users --outputTo /users/merged.users.json
-
Merge all the
CSV
files, convert into singleJSON
file by converting string values into map by providingkeyValueSplitter
,propertySplitter
,keyIndex
,valueIndex
,field
andpluginType
astransfromPropertyToMap
# transformer-config.jsonmerge-convert --pattern "/users/*.users.csv" --outputTo /users/merged.users.json --transformerConfig transformer-config.json