How do I change a JSON Object Key

Hi everyone,

I am fairly new to Node-Red and am trying to change JSON Object keys.

I have two GPS Trackers that output their tracking data as per the msg.payloads below.


I will need to change the JSON Object keys of latitudeDeg and longitudeDeg to latitude and longitude and have tried with a Change node, below, with no success. Am I using the proper syntax/method?


Thank you for your help!!

Just set new properties to the existing ones.

Set :: msg.payload.latitude :: to :: msg.payload.latitudeDeg

and so on.

Set will copy them
So maybe use move instead ?

1 Like