Skip to content

Array subtraction after select? #1240

Answered by philomory
philomory asked this question in Q&A
Discussion options

You must be logged in to vote

Nevermind, I figured out that the correct syntax would be [.[]] or, more specifically, [.[] | select(...)]. .[] | [.] doesn't give you ["a","b"], it gives you ["a"] and ["b"] as separate items, so when you do array subtraction afterwards you are left with ["a"]" and [].

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by philomory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant