Convert CSV to JSON with miller

mlr --c2j --jlistwrap cat file.csv
Using the csv tool `miller` you can transform a csv file into a json array of objects, where the properties are the values of the csv header line and the values are the values of the subsequent lines.
Sample Output
[
 { "H1": "a1", "H2": "a2", "H3": "a3" },
 { "H1": "b1", "H2": "b2", "H3": "b3" },
 { "H1": "c1", "H2": "c2", "H3": "c3" }
]

2
By: pepa65
2019-12-06 07:16:58

3 Alternatives + Submit Alt

What Others Think

are there any recent updates with hair extensions atlanta?
looneyhans · 43 weeks and 3 days ago
will starting doing this now.. baby photography thanks for helping me!
idasanka · 38 weeks and 6 days ago
private investigator orlando Just found a site a could relate to
yeoyeo · 37 weeks and 1 day ago
love this soo much! http://https//bestmoldremovalsanantonio.com/">fly
sammm · 34 weeks ago
Thank you for posting that it could be just the thing to give inspiration to someone who needs it! Keep up the great work! myaarpmedicare.com
Caesar · 31 weeks and 3 days ago
I can't keep up unsecured loans santa maria
geebranz · 19 weeks and 2 days ago
very valuable cabinet companies in virginia beach
geebranz · 19 weeks and 2 days ago
Now nothing has changed, because educational education does not stand still, and I do not always keep up with written assignments, so I use the essay writers for myself, where they write my homework for me
Appencet · 10 weeks and 6 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: