I have a JSON file with thousands of JSON objects, such as below.
I want to compare the values of st1 against st2.
For every object in the JSON file: If st1 is larger than st2, copy that object into another file.
{
"in": 4,
"li": [{
"fa": 28806,
"fs": 00002,
"fb": 21894
}],
"ome": {
"ms": "00000000000"
},
"st2": 1508584163,
"ei": {
"ev": 0
},
"rn": 4,
"st1": 1508584147
}
I have tried using jq, or is it easier doing it with awk even though it's a JSON file?