Iterate over json doesn't works

Hi,

I’m trying to make a ping to all ips save in json format. I pass the json with two different ips and then I try to rotate the ping for both ips but the only thing it does is the ping to the first entry.
Maybe the format of the json is not the right one or in the ping I don’t indicate well the element that should be used. This is my first contact with n8n.

Share the output returned by the last node

[
  {
    "exitCode": 0,
    "stderr": "",
    "stdout": "PING 192.168.1.11 (192.168.1.11) 56(84) bytes of data.\n64 bytes from 192.168.1.11: icmp_seq=1 ttl=64 time=0.892 ms\n64 bytes from 192.168.1.11: icmp_seq=2 ttl=64 time=0.848 ms\n64 bytes from 192.168.1.11: icmp_seq=3 ttl=64 time=0.799 ms\n\n--- 192.168.1.11 ping statistics ---\n3 packets transmitted, 3 received, 0% packet loss, time 2046ms\nrtt min/avg/max/mdev = 0.799/0.846/0.892/0.037 ms"
  }
]

Information on your n8n setup

  • n8n version: : 1.64.2
  • Running n8n via (Docker, npm, n8n cloud, desktop app): : Proxmox
  • Operating system: : Debian

Regards

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Welcome to the community @estonolose !

Tip for sharing information

Pasting your n8n workflow


Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.

```
<your workflow>
```

That implies to any JSON output you would like to share with us.

Make sure that you have removed any sensitive information from your workflow and include dummy or pinned data with it!


Your IPs are in the array. Use Split Out node to get them as a separate items before engaging the Loop. The ping command needas to be also adjusted accordingly:

1 Like

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