A string b is contained in a string a if b is a substring of a. When attempting to run the jq command, it has this error: Use jq to update property of object that contains other property with specific value
Reshaping JSON with jq Programming Historian
A working script for your use case would be as.
Another powerful operator is “contains”, which allows you to query the summary, description, environment, and comments fields and custom fields that use the “free text.
For strings, it will return true if the string is a substring. It appears that despite the variable containing the qoutes, the space in the variable is stopping the query. An array b is contained in an array a. # get name of id 1 $ cat file.json | jq '.results[] | select(.id == 1) | {name}' # get result with multiple filters $ cat file.json | jq '.results[] | select((.id == 1) and (.name=a))' # filter with.
The filter contains(b) will produce true if b is completely contained within the input. And for text matching tasks, you may want to use contains. If json value has no double quotes (eg.</p> To get json record having _id equal 611.

Select と contains を使うことで、特定の文字列を含むプロパティを持つオブジェクトを取り出すことができます。 下記の例では、.name プロパティに to が含まれるオブジェクトを取り出.



