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 want to return "AT" and the power corresponding to "AT", so I don't want to return "text1" but just [["text",10],["text2",40]]. This query [A[*].AT,B[*].power] return this: [["text","text2"],[10,20,40]]. So it's not exactly what I want because I don't want the extra value: 20 from "text1". I found this portion of code root[*].B[?contains(['text','text2'],name)].[name,power][][] it return ["text",10,"text2",40] this is the good result BUT the query isn't dynamics, because in the contain I have this ['text','text2'] and I want to replace this portion of code with a nested query if it's possible, so, how can I do that ?
How can I fix that ?
The text was updated successfully, but these errors were encountered:
Considert we have this JSON:
I want to return "AT" and the power corresponding to "AT", so I don't want to return "text1" but just
[["text",10],["text2",40]]
. This query[A[*].AT,B[*].power]
return this:[["text","text2"],[10,20,40]]
. So it's not exactly what I want because I don't want the extra value: 20 from "text1". I found this portion of coderoot[*].B[?contains(['text','text2'],name)].[name,power][][]
it return["text",10,"text2",40]
this is the good result BUT the query isn't dynamics, because in the contain I have this['text','text2']
and I want to replace this portion of code with a nested query if it's possible, so, how can I do that ?How can I fix that ?
The text was updated successfully, but these errors were encountered: