Here I'm trying to write jq command that should ignore the message check failed for material: and Error while scheduling, and print the rest.
The other values which I'm trying to print will get changing at every time. But these msg will remain constant (check failed for material:, Error while scheduling). We need to write a jq cmd that should ignore the mentioned message and print the rest/changing content.
Please let me know if I'm not clear.
Thanks in Advance !
[
{
"message":"check failed for material:",
"detail":"Error performing",
"level":"ERROR"
},
{
"message":"check failed for material:",
"detail":"Error performing command",
"level":"ERROR"
},
{
"message":"Error while scheduling",
"detail":"Maximum limit reached",
"level":"ERROR"
},
{
"message":"Error while scheduling",
"detail":"Maximum limit reached",
"level":"ERROR"
},
{
"message":"Duplicate error",
"detail":"Found a mapping value where it is not allowed",
"level":"ERROR"
},
{
"message":"Invalid Merged Configuration",
"detail":"Number of errors: 44",
"level":"ERROR"
}
]
On jqplay: https://jqplay.org/s/tCYiua9KzH
Desired output:
[
{
"message": "Duplicate error",
"detail": "Found a mapping value where it is not allowed",
"level": "ERROR"
},
{
"message": "Invalid Merged Configuration",
"detail": "Number of errors: 44",
"level": "ERROR"
}
]