Can't parse array from JSON input to table
Options
![Theis Sondergaard](https://us.v-cdn.net/6037124/user_avatars/4488238.jpg)
Theis Sondergaard
Member ✭
I've made a Webflow form that successfully submits via a webhook to Xano. The basics are working, I'm getting the JSON input and mapping the data to the correct table.
One of the form-fields is a multi-select, and I can't figure out how to ingest this data properly. This is what the JSON looks like:[json.png]But trying to get the data like this doesn't work (it does work for all the other fields without arrays):[Screenshot 2022-05-31 at 16.53.41.png]The table I'm trying to map it to is configured like this:[Screenshot 2022-05-31 at 17.03.55.png]
What would be the correct syntax / method to get the array data into my table? 😐
One of the form-fields is a multi-select, and I can't figure out how to ingest this data properly. This is what the JSON looks like:[json.png]But trying to get the data like this doesn't work (it does work for all the other fields without arrays):[Screenshot 2022-05-31 at 16.53.41.png]The table I'm trying to map it to is configured like this:[Screenshot 2022-05-31 at 17.03.55.png]
What would be the correct syntax / method to get the array data into my table? 😐
Comments
-
Hi, Theis! It looks like produce-country is being passed as a normal text string. An array would be indicated by brackets []. You can apply a Split filter to this value first to separate them into an array, and I think that will take care of it for you.
-
Thanks for the ultra-fast reply!
It certainly did something, but not quite.
This is what I'm now looking for:[Screenshot 2022-05-31 at 17.26.43.png]But it doesn't successfully read the values - what I instead end up with are 4 empty rows, if I submit 4 values (instead of the 4 values submitted into the first 4 columns of the first row):[Screenshot 2022-05-31 at 17.27.22.png]
In the table overview, I can see that it creates the same number of rows as the number of values submitted:[Screenshot 2022-05-31 at 17.26.57.png] -
this looks like it’s wrapped more deeply in the logic of the function stack or the filters on the query. If you share more screenshots I would be glad to take a look, else you might consider an office hours for xano or I’d be glad to help with a 1-1 session via my consulting firm, Statechange -
I'm wondering if having your sourcing-countries as an object list is causing an issue here. I'd love to see how the function behaves if you swap this to a table reference list. You can just add a new column to test this with if you don't want to modify your existing for now.[image.png]
-
Boom, that worked 😀 Thanks Chris!![Screenshot 2022-05-31 at 21.22.01.png]
-
Awesome, glad to hear it.
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