dominictarr / JSONStream

rawStream.pipe(JSONStream.parse()).pipe(streamOfObjects)
Other
1.92k stars 165 forks source link

Support for top-level/nested `emitKey`/`$` #160

Open andybarron opened 6 years ago

andybarron commented 6 years ago

For the following JSON:

{
  users: {
    a:  { name: 'User A' }
  },
  posts: {
    b:  { name: 'Post B' }
  },
}

I would love a way to emit the following two outputs: { key: ['users', 'a'], value: { name: 'User A' } } { key: ['posts', 'b'], value: { name: 'Post B' } }