Merge/Join 2 messages


Hi.

I am trying to merge or join the 2 messages in to one but one is an object and one is a string. The join nodes does not work. How can i join merge these two messages i have tried everything but no success.

The first message is from a Termux Android GPS API and the second is from a function flow that i created.

Can anybody help me please.

You can use a csv node to convert your string into an object - it will look like this

{"col1":"probe00001",
"col2":" Mosselbaai",
"col3":" Diaz Strand",
"col4":" Drinks"}

You might want to use a change node to rename the elements to something more meaningful.
Both messages need to have a msg.topic property: msg.topic = "gps", msg.topic = "event".
Then the join node in Manual mode will combine them into one.

{
"event":{"col1":"probe00001","col2":" Mosselbaai","col3":" Diaz Strand","col4":" Drinks"},
"gps":{"latitude":-34.2,"longitude":22.1, etc}
}

Many many thanks.....it works !!!
I cant thank you enough i have been battling for days :grinning: :grinning:

1 Like

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