Im trying to use grep to filter a json object array so that the array is searched and if the value of any of keys #2-6 are yes, the value of keys 1 and 7 are returned.
The array is below -- in other words, if any of values for the 'location' keys are yes, the name and description are returned as list items.
Any help is VERY much appreciated.
[
{
"name": "name",
"location1": "no",
"location2": "no",
"location3": "yes",
"location4": "no",
"location5": "no",
"description": "description of services"
},
{
"name": "name",
"location1": "yes",
"location2": "no",
"location3": "yes",
"location4": "no",
"location5": "no",
"description": "description of services"
}
]