tidwall / gjson

Get JSON values quickly - JSON parser for Go
MIT License
13.95k stars 841 forks source link

How to combine N single queries into one Result, like Get() returns for multiple hits? #285

Open Robert-M-Muench opened 2 years ago

Robert-M-Muench commented 2 years ago

Let's say I have 1..N values for a key. The JSON has X entries, and for N entries the keys will match.

I want to create a gjson.Result in the form I get as result when querying a path that returns multiple hits like mydata.#(value == 1)#. Is there something like mydata.#(value == <list of values>)#?

When manually iterating through my N keys, I can create a '[]Resultif course, but this is something different than having oneResult` containing all the matches.