Reputation: 486
I'm trying to compare two attributes on every object. This is the code i use for this problem:
(.result[].downlaodable or .result[].playable)
but this time jq does cartesian product. If i have 3 object, jq turns me 9 object.
I have to convert it to something like this:
(.result[1].downlaodable or .result[1].playable)
(.result[2].downlaodable or .result[2].playable)
(.result[3].downlaodable or .result[3].playable)
How can i do that?
Upvotes: 1
Views: 264
Reputation: 134901
Change your filter to generate the results once.
.result[] | .downloadable or .playable
Upvotes: 3