mbostock / ndjson-cli

Command line tools for operating on newline-delimited JSON streams.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add ndjson-split?

mbostock opened this issue · comments

Like ndjson-map, but each expression evaluation returns an array of objects, and each object is output separately. Allows you to take a FeatureCollection as input and then split it into a stream of Features, for example, which could be processed and then joined back together with ndjson-reduce.

Another example would be to take csv2json and output individual JSON objects for each line. Or just add a -n option to csv2json and tsv2json.