I have a JSON document I am querying for some data. I need to loop through the IDs and find any IDs that contain a letter. Currently I have:
cat results.json | jq '.array|map(select( (.id|contains("a")) or (.id|contains("b")) ))' etc. etc.
How can I write a more efficient query/regex to do this in one contains() function e.g. something like:
cat results.json | jq '.array|map(select( (.id|contains("a-z")) ))' etc. etc.
Thanks!
Given this input:
The following JQ filter:
will produce the following output: