I think I did that, and I lost information. Can't be sure. But it had me spinning for a while and then I realised (bad use of words I know) that I had to make it as I have it so it is compatible with the code I had already written for the advanced-ping node. Though had to change msg.host to msg.payload for the new ping node.
That had me stumped for a while too.
When I was not getting anything out of the ping node, I looked at the messages and saw they were sending it as msg.host.
I changed it to msg.payload and things started to work, but then other wheels fell off with missing message parts - which lead to me asking.
I may have to try it again tomorrow and see what I get.
Push coming to shove, if I get enough of the right data out, I will modify the other code. Obviously.
Thanks.
I'll report back with results when I get into it in the next session.
I was editing the reply. (Didn't think I'd get a reply that quick.)
No. Alas in my code it was addr. I changed it to payload that didn't work.
But looking at what @Steve-Mcl said: It has to be host.
I'll confirm that beyond belief but that seems a bit inconsistent with how the node expects inputs.
Changing from payload to hosts.
Not really. It can be a string or an object in the array. but if you send an object, then the node needs to know what you want to ping. It just so happens to want you to put the host name or IP in the property host