{"_id":"jsonfilter","_rev":"132572","name":"jsonfilter","description":"Streaming JSON filtering on the command line","dist-tags":{"latest":"1.1.2"},"maintainers":[{"name":"groundwater","email":"groundwater@gmail.com"},{"name":"jlord","email":"to.jlord@gmail.com"},{"name":"visnup","email":"visnupx@gmail.com"}],"time":{"modified":"2021-06-03T11:13:54.000Z","created":"2014-07-02T04:57:35.578Z","1.1.2":"2014-11-04T15:46:03.076Z","1.1.1":"2014-11-04T15:30:51.063Z","1.1.0":"2014-11-04T15:30:10.372Z","1.0.2":"2014-07-04T21:24:18.016Z","1.0.1":"2014-07-02T05:23:41.179Z","1.0.0":"2014-07-02T04:57:35.578Z"},"users":{"jits":true,"ngoldman":true},"author":{"name":"max ogden"},"repository":{"type":"git","url":"https://github.com/maxogden/jsonfilter.git"},"versions":{"1.1.2":{"name":"jsonfilter","version":"1.1.2","bin":{"jsonfilter":"cli.js"},"description":"Streaming JSON filtering on the command line","main":"index.js","author":{"name":"max ogden"},"license":"BSD","dependencies":{"JSONStream":"^0.8.4","stream-combiner":"^0.2.1","minimist":"^1.1.0","through2":"^0.6.3"},"scripts":{"test":"cat test.json | jsonfilter dog"},"repository":{"type":"git","url":"https://github.com/maxogden/jsonfilter.git"},"bugs":{"url":"https://github.com/maxogden/jsonfilter/issues"},"homepage":"https://github.com/maxogden/jsonfilter","gitHead":"7180dfb6695cb4df7677a807c2fd79724154ce70","_id":"jsonfilter@1.1.2","_shasum":"21ef7cedc75193813c75932e96a98be205ba5a11","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.28","_npmUser":{"name":"maxogden","email":"max+DONT+EMAIL+ME@maxogden.com"},"maintainers":[{"name":"groundwater","email":"groundwater@gmail.com"},{"name":"jlord","email":"to.jlord@gmail.com"},{"name":"visnup","email":"visnupx@gmail.com"}],"dist":{"shasum":"21ef7cedc75193813c75932e96a98be205ba5a11","size":2131,"noattachment":false,"key":"/jsonfilter/-/jsonfilter-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/jsonfilter/download/jsonfilter-1.1.2.tgz"},"directories":{},"publish_time":1415115963076,"_cnpm_publish_time":1415115963076,"_hasShrinkwrap":false},"1.1.1":{"name":"jsonfilter","version":"1.1.1","bin":{"jsonfilter":"cli.js"},"description":"Streaming JSON filtering on the command line","main":"index.js","author":{"name":"max ogden"},"license":"BSD","dependencies":{"JSONStream":"^0.8.4","stream-combiner":"^0.2.1","through2":"^0.6.3"},"devDependencies":{"minimist":"^1.1.0"},"scripts":{"test":"cat test.json | jsonfilter dog"},"repository":{"type":"git","url":"https://github.com/maxogden/jsonfilter.git"},"bugs":{"url":"https://github.com/maxogden/jsonfilter/issues"},"homepage":"https://github.com/maxogden/jsonfilter","gitHead":"1d06b9f418e4978670bef69570d89484a1679e17","_id":"jsonfilter@1.1.1","_shasum":"c72c026055f16b9e379644a1ae61568a35ad73ca","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.28","_npmUser":{"name":"maxogden","email":"max+DONT+EMAIL+ME@maxogden.com"},"maintainers":[{"name":"groundwater","email":"groundwater@gmail.com"},{"name":"jlord","email":"to.jlord@gmail.com"},{"name":"visnup","email":"visnupx@gmail.com"}],"dist":{"shasum":"c72c026055f16b9e379644a1ae61568a35ad73ca","size":2133,"noattachment":false,"key":"/jsonfilter/-/jsonfilter-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/jsonfilter/download/jsonfilter-1.1.1.tgz"},"directories":{},"publish_time":1415115051063,"_cnpm_publish_time":1415115051063,"_hasShrinkwrap":false},"1.1.0":{"name":"jsonfilter","version":"1.1.0","bin":{"jsonfilter":"cli.js"},"description":"Streaming JSON filtering on the command line","main":"index.js","author":{"name":"max ogden"},"license":"BSD","dependencies":{"JSONStream":"^0.8.4","stream-combiner":"^0.2.1","through2":"^0.6.3"},"devDependencies":{"minimist":"^1.1.0"},"scripts":{"test":"cat test.json | jsonfilter dog"},"repository":{"type":"git","url":"https://github.com/maxogden/jsonfilter.git"},"bugs":{"url":"https://github.com/maxogden/jsonfilter/issues"},"homepage":"https://github.com/maxogden/jsonfilter","gitHead":"d36f942f71bf9d6e2447af4afa7e0172398710c7","_id":"jsonfilter@1.1.0","_shasum":"a5d0129c1f878a9cb3068d24f6fbc9bcc2a214f2","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.28","_npmUser":{"name":"maxogden","email":"max+DONT+EMAIL+ME@maxogden.com"},"maintainers":[{"name":"groundwater","email":"groundwater@gmail.com"},{"name":"jlord","email":"to.jlord@gmail.com"},{"name":"visnup","email":"visnupx@gmail.com"}],"dist":{"shasum":"a5d0129c1f878a9cb3068d24f6fbc9bcc2a214f2","size":2136,"noattachment":false,"key":"/jsonfilter/-/jsonfilter-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/jsonfilter/download/jsonfilter-1.1.0.tgz"},"directories":{},"publish_time":1415115010372,"_cnpm_publish_time":1415115010372,"_hasShrinkwrap":false},"1.0.2":{"name":"jsonfilter","version":"1.0.2","bin":{"jsonfilter":"cli.js"},"description":"Streaming JSON filtering on the command line","main":"index.js","author":{"name":"max ogden"},"license":"BSD","dependencies":{"JSONStream":"^0.8.4","stream-combiner":"^0.2.1"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/maxogden/jsonfilter.git"},"bugs":{"url":"https://github.com/maxogden/jsonfilter/issues"},"homepage":"https://github.com/maxogden/jsonfilter","_id":"jsonfilter@1.0.2","dist":{"shasum":"884d857205bfc5a374c09d5a98161bcbec6ba59f","size":1530,"noattachment":false,"key":"/jsonfilter/-/jsonfilter-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/jsonfilter/download/jsonfilter-1.0.2.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"jlord","email":"to.jlord@gmail.com"},"maintainers":[{"name":"groundwater","email":"groundwater@gmail.com"},{"name":"jlord","email":"to.jlord@gmail.com"},{"name":"visnup","email":"visnupx@gmail.com"}],"directories":{},"publish_time":1404509058016,"_cnpm_publish_time":1404509058016,"_hasShrinkwrap":false},"1.0.1":{"name":"jsonfilter","version":"1.0.1","bin":{"jsonfilter":"cli.js"},"description":"Streaming JSON filtering on the command line","main":"index.js","author":{"name":"max ogden"},"license":"BSD","dependencies":{"JSONStream":"^0.8.4","stream-combiner":"^0.2.1"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/maxogden/jsonfilter.git"},"bugs":{"url":"https://github.com/maxogden/jsonfilter/issues"},"homepage":"https://github.com/maxogden/jsonfilter","gitHead":"7fa8b4440f9f33142ef6d9dee229efb252f694e7","_id":"jsonfilter@1.0.1","_shasum":"c61e46f47589d4b94cbdf1d928c0afe6ebac2ced","_from":".","_npmVersion":"1.4.16","_npmUser":{"name":"maxogden","email":"max@maxogden.com"},"maintainers":[{"name":"groundwater","email":"groundwater@gmail.com"},{"name":"jlord","email":"to.jlord@gmail.com"},{"name":"visnup","email":"visnupx@gmail.com"}],"dist":{"shasum":"c61e46f47589d4b94cbdf1d928c0afe6ebac2ced","size":1271,"noattachment":false,"key":"/jsonfilter/-/jsonfilter-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/jsonfilter/download/jsonfilter-1.0.1.tgz"},"directories":{},"publish_time":1404278621179,"_cnpm_publish_time":1404278621179,"_hasShrinkwrap":false},"1.0.0":{"name":"jsonfilter","version":"1.0.0","bin":{"jsonfilter":"cli.js"},"description":"Streaming JSON filtering on the command line","main":"index.js","author":{"name":"max ogden"},"license":"BSD","dependencies":{"JSONStream":"^0.8.4","stream-combiner":"^0.2.1"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/maxogden/jsonfilter.git"},"bugs":{"url":"https://github.com/maxogden/jsonfilter/issues"},"homepage":"https://github.com/maxogden/jsonfilter","gitHead":"65a4c23ddbabb4f8e4ca6444e402cdfdb6d249f8","_id":"jsonfilter@1.0.0","_shasum":"b55d1329f4b11f1e71c093b939a51c146ccf6df0","_from":".","_npmVersion":"1.4.16","_npmUser":{"name":"maxogden","email":"max@maxogden.com"},"maintainers":[{"name":"groundwater","email":"groundwater@gmail.com"},{"name":"jlord","email":"to.jlord@gmail.com"},{"name":"visnup","email":"visnupx@gmail.com"}],"dist":{"shasum":"b55d1329f4b11f1e71c093b939a51c146ccf6df0","size":1224,"noattachment":false,"key":"/jsonfilter/-/jsonfilter-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/jsonfilter/download/jsonfilter-1.0.0.tgz"},"directories":{},"publish_time":1404277055578,"_cnpm_publish_time":1404277055578,"_hasShrinkwrap":false}},"readme":"# jsonfilter\n\nStreaming JSON filtering on the command line. Supports JSON querying and expression based filtering.\n\nWorks great for JSON datasets that are too big to JSON.parse() or for situations where you want to start reading data immediately.\n\nPowered by [JSONStream](https://www.npmjs.org/package/JSONStream) which is powered by [jsonparse](https://www.npmjs.org/package/jsonparse)\n\n[![NPM](https://nodei.co/npm/jsonfilter.png?global=true)](https://nodei.co/npm/jsonfilter/)\n\n## usage\n\nPipe JSON data to stdin!\n\n```\njsonfilter <selector> [--match=\"filter expression\"]\n```\n\n`filter` is a string to 'query' your JSON with.\n\nMatches will be printed as Newline Delimited JSON (NDJSON)\n\n**some examples:**\n\nEmit the value of a particular key by naming it, e.g. `\"name\"` matches the key `name` in an object and returns the value:\n\n```\n$ echo '{\"name\": \"Joe Blogs\", \"age\": 28}' | jsonfilter \"name\"\n\"Joe Blogs\"\n```\n\n`rows.*` matches any child elements of `rows`, e.g.:\n\n```BASH\n$ echo '{\"name\": \"foo\", \"type\": \"bar\"}{\"name\": \"foobar\", \"type\": \"barfoo\"}' | jsonfilter \"name\"\n\"foo\"\n\"foobar\"\n```\n\n`\"rows.*\"` matches any child elements (items inside the array) of `rows`, e.g.:\n\n```BASH\n$ echo '{\"rows\": [ {\"this object\": \"will be matched\"}, {\"so will\": \"this one\"} ]}' | jsonfilter \"rows.*\"\n{\"this object\": \"will be matched\"}\n{\"so will\": \"this one\"}\n```\n\n`\"rows.*.doc\"` matches all children of `rows` with key `doc`, e.g.:\n\n```BASH\n$ echo '{\"rows\": [ {\"doc\": {\"this object\": \"will be matched\"}, \"foo\": \"bar\"} ]}' | jsonfilter \"rows.*.doc\"\n{'this object': 'will be matched'}\n```\n\n`\"rows..doc\"` recursively matches all children of `rows` and emits all with key `doc`, e.g.:\n\n```BASH\n$ echo '{\"rows\": [ {\"foo\": {\"bar\": {\"baz\": {\"taco\": {\"doc\": \"woo\"}}}}} ]}' | jsonfilter \"rows..doc\"\n\"woo\"\n```\n\n## matching\n\nby default all matched objects are emitted. You can supply a custom JS expression to filter out matching objects with the `--match` option.\n\n```BASH\n$ echo '{\"name\": \"foo\", \"type\": \"bar\"}{\"name\": \"foobar\", \"type\": \"barfoo\"}' | jsonfilter \"name\" --match=\"this === 'foo'\"\n\"foo\"\n\n$ echo '{\"name\": \"foo\", \"type\": \"bar\"}{\"name\": \"foobar\", \"type\": \"barfoo\"}' | jsonfilter --match=\"this.name === 'foo'\"\n{\"name\": \"foo\", \"type\": \"bar\"}\n\n$ echo '{\"name\": \"foo\", \"type\": \"bar\"}{\"name\": \"foobar\", \"type\": \"barfoo\"}' | jsonfilter --match=\"this.name.indexOf('foo') > -1\"\n{\"name\": \"foo\", \"type\": \"bar\"}\n{\"name\": \"foobar\", \"type\": \"barfoo\"}\n```\n","_attachments":{},"homepage":"https://github.com/maxogden/jsonfilter","bugs":{"url":"https://github.com/maxogden/jsonfilter/issues"},"license":"BSD"}