Separate data coming from form

I’m pulling data from a form through webhock, when I receive this data I intend to separate the marked checkboxes to put them in a list or database, however, I can’t separate this data.

When receiving the data I need to separate them so that I can record all the other data and each field_post[] separately.

Hey @midiacloud_mkt, do I understand correctly, that field_posts is an array inside the body? If so, you could just the Item Lists node to split it out. Here’s a quick example:

1 Like

Simply incredible! Thank you very much

I’m quite a beginner, I still couldn’t understand how I get the data and put it inside the array

Ah my code node in there was just to mock your data/use-case, so you can ignore that. For you, only add the Item Lists node after your webhook in the way I did it.

I understand what you mean, but I’m still having a problem and I’m not finding the error.

Hmm, that’s indeed strange. It seems like your incoming data from the webhook is actually not an array but instead just individual properties. If you can, I would suggest changing the webhook to actually return an array.

Since changing a webhook is not always possible you could also try this (very hacky) solution:

You might then later use the items list or change the code slightly… I highly suggest you change the data structure of the webhook though :smiley:

1 Like

It’s likely that I’m going to give up, I’ve tried everything that has helped me, but it’s not working.

Consegui! Muito Obrigado!

1 Like

Unfortunately your data format is very unstructured. This one is a real array now where you could directly use the items list

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.