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
And you want to select all languag names you can do that with .languagesSpoken[].lang
If you want to select only the preferred ones you can do something like [.languagesSpoken[] | if .preferred then .lang else 0 end] but that is imo not satisfying since the list now contains a placeholder. I suggest <> a subquery syntax.
exp1<exp2> would be equivalent to [exp1[] | if exp2 then . else **Nothing** end]
languagesSpoken<.preferred>.lang would be "English"
Since it can only be applied to a array i suggest it should be languagesSpoken<.preferred> rather than ``languagesSpoken[]<.preferred>`
The text was updated successfully, but these errors were encountered:
Suggest you have this code (from selectjson)
And you want to select all languag names you can do that with
.languagesSpoken[].lang
If you want to select only the preferred ones you can do something like
[.languagesSpoken[] | if .preferred then .lang else 0 end]
but that is imo not satisfying since the list now contains a placeholder. I suggest <> a subquery syntax.exp1<exp2>
would be equivalent to[exp1[] | if exp2 then . else **Nothing** end]
languagesSpoken<.preferred>.lang
would be"English"
Since it can only be applied to a array i suggest it should be
languagesSpoken<.preferred>
rather than ``languagesSpoken[]<.preferred>`The text was updated successfully, but these errors were encountered: