Extracting objects from an object array of specific indices

Options
I have an array of numbers, say A. I have a different object array B and want to filter objects of only those indices which are the elements of A.

I am trying to use for loop :
for each "item" of A,
 Add to C (New variable which is type Array), those elements of B whose index = item

I am unable to get this right.

Can you help me with the syntax. I do not know how to pass "item" in the path
[image.png]I do not know if I am even doing this right. If you could let me know there's a better method, that would be greatly helpful

Thank you, 
Prathyusha 

Comments

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options
    I think you are looking for the "get" filter to fetch the array. So if I am reading the data structure in your screenshot correctly CurrentSessionDateSet.0.image (press filter) (select get) (path = item)
  • Prathyusha Chilagani
    Options

    Hello Ray,
    Thank you very much. That worked!
    👍