How do I create an object from two lists with repeated items?
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
- 46 π£ Announcements
- 47 π¦Ύ Releases
- 36 π Welcome
- 924 π€· Help! I'm a Noob
- 113 π± No-Code Front-Ends
- 597 π Working with APIs
- 418 π’ Transforming data
- 120 π Connect Xano to ...
- 46 π§βπ» Find an Expert
- 320 βOther questions
- 32 π Security
- 22 βοΈ Snippets
- 19 π Showcase
- 7 π£οΈ ο»Ώ Xano Chatter
- 60 πΊ Video Tutorials
- 166 π Request a feature
- 219 π Report a Bug
- 19 π Templates & Extensions
- 6 π¬ Feedback