In jq, how to get the name of the enclosing object while filtering for property values in that enclosed object
I always find that phrasing the question about jq is much harder than asking the question. 🙂
How to make a certain double cartesian product with jq?
Suppose I have this dataset:
How to get jq to output a long dataset (part 2)?
Suppose I have this ndjson file:
Using JQ to parse timestamp
I am having some difficulty finding my error with JQ parsing this timestamp.
JQ – Using a non UTC date field and looking back a certain amount of time
I am trying to write a BASH+jq one liner to only return the entries that are less than 5 minutes old as I am writing automation to only look back 5 minutes (BASH). Using the following JSON:
How to control jq error message when input is not valid json?
jq
prints error message like the following when the input is invalid.
Why neither branch of if-statement is reached?
Since .value
is true
, which does not have an field message
, I thought .message?
should be evaluated to false
. Then “Y” should be printed. Can you help me understand why neither “X” nor “Y” is printed?
How to get jq to output a long dataset?
Suppose I have this ndjson:
Does jq map function change the input object?
The docs certainly make it sound like it does not. But, I can’t think of any way to explain the behavior below. What am I doing wrong?