How do I create an object from two lists with repeated items?
Options
Hi all,
I have the following two tables:
[0,0,1,0,0,1,0] and [a,b,c,d,e,f]
and I would want the following object:
{0:[a,b,d,f],1:[c,e]}
That is, I want items in the first list to become the keys (0 and 1) and corresponding items in the other list to become the values and where the items in the first list are repeated, corresponding items in the other list are placed in a list.
I have tried within my abilities and I keep getting the following
{0:a,1:c}.
Your help would be highly appreciated. Thanks.
Answers
-
Hi,
What's the logic behind assigning items from the second table to the key from the first one?
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