JSONStream.parse(path)

The .. operator is the recursive descent operator from JSONPath, which will match a child at any depth (see examples below).

If your keys have keys that include . or * etc, use an array instead.
['row', true, /^doc/].

If you use an array, RegExps, booleans, and/or functions. The .. operator is also available in array representation, using {recurse: true}.
any object that matches the path will be emitted as 'data' (and piped down stream)

If path is empty or null, no 'data' events are emitted.

If you want to have keys emitted, you can prefix your * operator with $: obj.$* - in this case the data passed to the stream is an object with a key holding the key and a value property holding the data.

recursive patterns (..)

JSONStream.parse('docs..value')
(or JSONStream.parse(['docs', {recurse: true}, 'value']) using an array)
will emit every value object that is a child, grand-child, etc. of the
docs object. In this example, it will match exactly 5 times at various depth
levels, emitting 0, 1, 2, 3 and 4 as results.

{

"total":5,

"docs":[

{

"key":{

"value":0,

"some":"property"

}

},

{"value":1},

{"value":2},

{"blbl":[{},{"a":0,"b":1,"value":3},10]},

{"value":4}

]

}

JSONStream.parse(pattern, map)

provide a function that can be used to map or filter
the json output. map is passed the value at that node of the pattern,
if map return non-nullish (anything but null or undefined)
that value will be emitted in the stream. If it returns a nullish value,
nothing will be emitted.

JSONStream also emits 'header' and 'footer' events,
the 'header' event contains anything in the output that was before
the first match, and the 'footer', is anything after the last match.