Need to get array from the JSON. trying to use "Code" node, but not working

[
{
“headers”: {
“host”: “saxxxx.app.n8n.cloud”,
“x-request-id”: “5822a2d830e437399395e2fb734492ee”,
“x-real-ip”: “21.118.189.190”,
“x-forwarded-for”: “21.118.189.190”,
“x-forwarded-host”: “sanxxxxj.app.n8n.cloud”,
“x-forwarded-port”: “443”,
“x-forwarded-proto”: “https”,
“x-forwarded-scheme”: “https”,
“x-scheme”: “https”,
“content-length”: “210”,
“authorization”: “Basic xxxxxxxxxxxxxxxxxxxxxxxxxxx9r”,
“content-type”: “application/json”
},
“params”: {},
“query”: {},
“body”: {
“contactSMS”: [
{
“to”: “+15161111111”,
“from”: “+163173333333”,
“message”: “Testing12. This is a test page -1”,
“uri”: “”
},
{
“to”: “+15162222222”,
“from”: “+163173333333”,
“message”: “Testing12. This is a test page”,
“uri”: “”
}
]
}
}
]

I want to get array contactSMS which has two items in it. How can I do this? Please help.

Are you going to loop Call the SMS interface? I write a sample and hope it can help you. :thinking:

2 Likes

Thank you so much for this!

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