Relative Content

Tag Archive for jsonjq

How to Subtract Objects in jq?

We can merge two objects recursively with * operator. For example like this: jq '.[0] * .[1]' -s a.json b.json. The only problem (I realized) with it is it doesn’t merge the arrays. But some guys did it.

How to Subtract Objects in jq?

We can merge two objects recursively with * operator. For example like this: jq '.[0] * .[1]' -s a.json b.json. The only problem (I realized) with it is it doesn’t merge the arrays. But some guys did it.

jq query with multiple conditions not working

I’m trying to run a jq query with multiple conditions, where the fields in the condition are in different parts of the JSON. The second condition isn’t narrowing things down, and I need help figuring out why. The JSON is below.

jq query with multiple conditions not working

I’m trying to run a jq query with multiple conditions, where the fields in the condition are in different parts of the JSON. The second condition isn’t narrowing things down, and I need help figuring out why. The JSON is below.

jq query with multiple conditions not working

I’m trying to run a jq query with multiple conditions, where the fields in the condition are in different parts of the JSON. The second condition isn’t narrowing things down, and I need help figuring out why. The JSON is below.

Print data for an object based on value(variable) for a key in jq output [duplicate]

This question already has answers here: Filter by Regex in JQ (2 answers) How to add contains or startswith in jq (1 answer) Closed last month. I have this JSON : [ { “id”: “1”, “agent”: “23ef”, “displayName”: “foo.com” }, { “id”: “2”, “agent”: “23gh”, “displayName”: “foo2.com” }, { “id”: “3”, “agent”: “23gf”, “displayName”: “boo.com” […]