And it works, returns the entire 'customer' object. But only as long as only one record has the "location_attr" field. As soon as I add "location_attr" to a second record - it stops working.
But a different op is still possible:
customers.data.locations[location_attr = "blue"]
However, this defeats the purpose - I need the customer id.
It's driving me nuts Please point me to the explanation/solution!
Explanation:
It returns all customers matching function :
data.locations.location_attr[$="blue"] != []
The left part (data.locations.location_attr[$="blue"]) of the function creates an array of all location_attr values belonging to that customer that have value "blue".