You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.
I want to parse big json file and get from it two property how can i do this?
like i choose one
var parser = JSONStream.parse('email'), how can i add another one?
The text was updated successfully, but these errors were encountered:
var stream = fs.createReadStream(fileName, {encoding: 'utf8'});
var parser = JSONStream.parse('email'); // how to add here another
return stream.pipe(parser);
};
getStream()
.pipe(es.mapSync(function (data) {
console.log(data);
}));
`
my code
JSONStream works best with list like data. Hopefully your json file is at some level, a very large array with many item.
you give JSONStream.parse(...) a path into the json object... maybe something like "rows.*.email" if you had a document that looked like {"rows": [....{email: foo@bar.com, ...}]}
if you need to get two properties, just take a path to the level they are in. say, rows.*
I want to parse big json file and get from it two property how can i do this?
like i choose one
var parser = JSONStream.parse('email'), how can i add another one?
The text was updated successfully, but these errors were encountered: