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
I've been trying to get this to work for a bit now and can't seem to figure it out. What I'm trying to do is simply return a value instead of an array that contains a single value. For example, given this json:
{this: "is", some: {test: "json"}}
and this JSONSelect query:
.some > .test
is there a way to get back simply "json", instead of ["json"]? I know I can index the array when the result comes out, but I'd really prefer to be able to state in my JSONSelect query that I just want a value and not an array.
The text was updated successfully, but these errors were encountered:
what would you like match to do if there is more than one node that matches?
How about this, have a look at the source. match is built upon foreach, so you can implement a new match function with whatever semantics you're after at a higher level. for reference, here's the match implementation:
I've been trying to get this to work for a bit now and can't seem to figure it out. What I'm trying to do is simply return a value instead of an array that contains a single value. For example, given this json:
{this: "is", some: {test: "json"}}
and this JSONSelect query:
.some > .test
is there a way to get back simply "json", instead of ["json"]? I know I can index the array when the result comes out, but I'd really prefer to be able to state in my JSONSelect query that I just want a value and not an array.
The text was updated successfully, but these errors were encountered: