I have a list of strings of tags related to a docker image.
The array looks like this:
["latest", "SOME_SHA"]
I cannot figure out how to select the value from the list that is not "latest".
I tried to use jq ´ select(. != "latest"´) but this returns the entire array, and not just the "SOME_SHA" value
>Solution :
To select all values not equal to a specific $value, you could use map(select(. != $value)); to select the first such value, if any, you could write:
first(.[]|select(. != $value))