Can't parse array from JSON input to table

Options
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? 😐

Comments

  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options
    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.
  • Theis Sondergaard
    Options
     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]
  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options

    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
  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options
    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]
  • Theis Sondergaard
    Options
    Boom, that worked 😀 Thanks Chris!![Screenshot 2022-05-31 at 21.22.01.png]
  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options
     Awesome, glad to hear it.