0.0.2 • Published 10 years ago
jq-stream v0.0.2
jq-stream
Install
npm i --save jq-streamUsage
jq(source, jsonpath, callback, done)
- source: Stream source, can be file, url or readable stream
- jsonpath: Path used to parse source, @see https://github.com/dominictarr/JSONStream#jsonstreamparsepath and http://goessner.net/articles/JsonPath/
- callback: Called on each match jsonpath
- done: Called on parsed
Example
var jq = require('jq-stream');
jq(
'/path/to/file',
'rows.*',
function (row) {
/* process */
},
function done() {}
);