in an array which filter should i use to find the ith element
Options
![mohan ramanujam](https://us.v-cdn.net/6037124/user_avatars/4156573.jpg)
mohan ramanujam
Member ✭
in an array retrieved from filter a db i want to get the ith element. Which filter should I use? I have seen entries findIndex, not sure.
Answers
-
@mohan ramanujam if you know the index you can just use dot notation.. var: model.0 would return the first item.
If you wish to find the index based on some conditions, I would recommend the Array function, Find First Element Index.
-
so how would i do model.i for the ith element
-
You would use the GET filter to have a variable act as the index you want.
var: model | GET| var: index
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