Return an ID each time a value is found in a object array from an array
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
-
Hey @Ray Deck Any chance you've already done it before? 😅
-
Seems like you are making progress reasoning through it. Take it step-by-step and use stop-and-debug to view your progress to get inside how the computer is thinking about it as you go.
Working through this kind of nested data and complex logic is what we do daily at State Change Pro in our office hours and loom-enabled forums.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback