Skip to content
This repository was archived by the owner on Dec 4, 2018. It is now read-only.
This repository was archived by the owner on Dec 4, 2018. It is now read-only.

recursive pattern example giving undefined error - line 71 on index.js #159

@ituhin

Description

@ituhin

JSONStream.parse('docs..value') (or JSONStream.parse(['docs', {recurse: true}, 'value'])

giving error for the example json

{
"total": 5,
"docs": [
{
"key": {
"value": 0,
"some": "property"
}
},
{"value": 1},
{"value": 2},
{"blbl": [{}, {"a":0, "b":1, "value":3}, 10]},
{"value": 4}
]
}

code -
const readStream = fs.createReadStream('../test.json')

readStream
.pipe(JSONStream.parse('docs..value')) //or JSONStream.parse(['docs', {recurse: true}, 'value'])
.pipe(es.mapSync(function (data) {
console.log(data)
return data
}))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions