Skip to content

jsonlines/jsonreduce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsonreduce

streaming command line newline-delimited json reducing utility modeled after jsonmap

build status

installation

$ npm install jsonreduce -g

usage

this will be each line of JSON that gets parsed out of the incoming newline-delimited json stream. Two arguments will be provided, previous and current. current is the current line being parsed while previous is the memoized value (same as this).

$ echo '{"foo": "bar"}\n{"baz": "taco"}' | jsonreduce 'this.keys = this.keys.concat(Object.keys(current))' --memo '{"keys": []}'
{"keys":["foo","baz"]}

License

MIT

About

streaming command line newline-delimited json reducing utility modeled after jsonmap

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published