How to send a simple string array to html post

Hello could someone help me explaining me how to make the simplest post call sending an array? it should be the easier thing, but I dont know how should be done.

the test array is a basic array of strings:

{
“testArray”: [“testo1”, “testo2”, “testo 333”]
}

I just need to make a post call and send that test array, nothing else.

I tried to create a string iterating, I tried to “create” a push function in a json but no luck, it looks like the harder things to make online it’s the easier but the easier things to do are the most difficult :smiley: liket operate with arrays… someone could give me some idea?

Thank you!!

You need to convert the array into a text string for this to work. You can use the join() function to combine the text for a simple array like that. Make sure that the “,” is between each value.

["{{ join(70.testArray; """,""") }}"]

Screenshot_2024-09-08_111044

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

1 Like

Hi, thank you for your reply, I tried already what you said but it doesnt work, the result is this:

testArrayPost: [“testo1,testo2,testo2”]

it creates a single array, what I would need is this:

testArrayPost: [“testo1”, “testo2”, “testo2”]

is it or am I missed something?

I addition using the split with “,” comma means I cannot use commas in the test of my arrays…

The only way I found is to send a full string with a splitter like “||” then making a JS testArrayPost.split(‘||’) on my server before to use the data, in this way it works but I thought there would be a way to make it directly…

Thank you again!

Please provide a screenshot to show that you have tried exactly what I have suggested, and a screenshot of the output.

Hi again,
I have tried again using your example with a manual array and yes, it’s worked as you have explained!
Thank you for help!!

I’m here again with the same problem, If I use a simple demo I can easily understand but as soon as I get into a more complex object I stuck for hours without to find the way out…

I attach a blueprint with one random test

blueprint.json (13.8 KB)

What I would like to be able to get is to send the array with all the details for each scene, as you can see I tried using “toArray” but it wont work, the result I get is this:

{"scenes": [Collection], [Collection], [Collection], [Collection]}

how to do it?

Thank you again for help!!!

Could you please create a separate topic for this?

While it’s tempting to continue an existing thread, a more effective approach would be to start a new topic. It helps other community users to respond to your query, and keeps our space organised for everyone. If you start a new conversation you are also more likely to get help from other users. You can refer others back to a related topic by including that link in your question. Thank you for understanding and keeping our community neat and tidy.

The “New Topic” link can be found in the top-right of the header:

Thanks!

Ah ok, allright, thank you!