I have the JSON file as shown below. What I want - using jq select and display as a new array all the individual Entries where db[].name is missing any of "Business Overview", "Load Test" or "Performance Monitoring". In other words, any Entry where all three of them are present in db.[] should be dropped and left only these where any of them is missing.
So, the result of applying such a filter would be displaying the very last Entry with "Tenant": "UT-S1835", where db[].name is missing "Load Test".
I can't seem to make it work. You probably know better, would be glad to know how.
Thanks
[
{
"Entry": {
"Tenant": "CA-T4932",
"Stage": "prd"
},
"db": [
{
"id": "xxxxx0001-0a0a-0b0b-0c0c-765434",
"name": "Business Overview",
},
{
"id": "bbbb0001-0a0a-0b0b-0c0c-6b68706",
"name": "Performance Monitoring"
},
{
"id": "bbbb0001-0a0a-0b0b-0c0c-f616465",
"name": "Load Test"
}
]
},
{
"Entry": {
"Tenant": "NV-R2133",
"Stage": "dev"
},
"db": [
{
"id": "ccccc0006-0a0a-0707-0c0c-765434",
"name": "Business Overview",
},
{
"id": "rrrrr0007-0f0f-0803-0c0c-5e18331",
"name": "Performance Monitoring"
},
{
"id": "bbbb0001-0a0a-0b0b-0d0d-d439575",
"name": "Load Test"
},
{
"id": "zzzz0004-0e0e-0ddd-0a0e-ee83005",
"name": "Home"
}
]
},
{
"Entry": {
"Tenant": "UT-S1835",
"Stage": "stg"
},
"db": [
{
"id": "bcbcb0032-0ccc-4040-1d1d-326923",
"name": "Business Overview",
},
{
"id": "rrrrr0007-a3b4-1230-0c0c-0e12044",
"name": "Performance Monitoring"
},
{
"id": "abab0043-0c0f-0dca-0a0e-ee31705",
"name": "Home"
}
]
}
]