Return an ID each time a value is found in a object array from an array

Options

Hi there,
I know it's possible but can't get my mind into it:
I am quering a database to have all the result matching a specific request.
It comes out as an array (list of results).
In this array, there is this "selected_club" section that has a specific array of objects I am interested in, I would like to see if my auth/id is part of this specific array of objects for each item return from this first array, and if so I would like to return the ID of this item from my main array.
How do I do that?

Underneath is just an example of 1 of the element of my main array, I guess I would have to loop through each of them… to get the ID of each item who has a selected.club: user_business_id matching my auth/id



Answers