-
Notifications
You must be signed in to change notification settings - Fork 847
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It now possible to select multiple independent paths and join their results into a single JSON document. For example, given the following JSON { "info": { "friends": [ {"first": "Dale", "last": "Murphy", "age": 44}, {"first": "Roger", "last": "Craig", "age": 68}, {"first": "Jane", "last": "Murphy", "age": 47} ] } } The path `[info.friends.0.first,info.friends.1.last]` returns ["Dale","Craig"] Or path `{info.friends.0.first,info.friends.1.last}` returns {"first":"Dale","last":"Craig"} You can also rename Object members such as `{"alt1":info.friends.0.first,"alt2":info.friends.1.last}` returns {"alt1":"Dale","alt2":"Craig"} Finally you can combine this with any GJSON component `info.friends.[0.first,1.age]` returns ["Dale",68] This feature was request by @errashe in issue #113.
- Loading branch information
Showing
2 changed files
with
227 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters