Say I have data something like this:
{
"18" : [ 2, 3, 3 ],
"28" : [ 2, 2, 7 ],
"45" : [ 3, 3, 5 ]
}
I'd like to make a jq
query that returns the key/keys of the object with the array that contains a given value. For example, 2 exists in keys "18" and "28", and 7 exists only exists in "28". It is the name of the parent object I'm interested in finding. I've been through the manual and I can't seem to find an example of anything like this.