# How do I change a JSON Object Key

**URL:** <https://discourse.nodered.org/t/how-do-i-change-a-json-object-key/10089>\
**Category:** General\
**Created:** [13 April 2019 02:57 UTC](https://discourse.nodered.org/t/how-do-i-change-a-json-object-key/10089 "2019-04-13T02:57:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Greenprotocol](https://avatars.discourse-cdn.com/v4/letter/g/e274bd/32.png) [@Greenprotocol](https://discourse.nodered.org/u/Greenprotocol)\
**Post date:** [13 April 2019 02:57 UTC](https://discourse.nodered.org/t/how-do-i-change-a-json-object-key/10089/1 "2019-04-13T02:57:56Z")

</div>

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.

![13%20PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/411c56dbf4c3230207edad181c742d4baf521966.png)

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?

![23%20PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/c/cdc18ad52bad9117f2799ba0d2bc61f04b7064ac.png)

Thank you for your help!!

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [13 April 2019 03:22 UTC](https://discourse.nodered.org/t/how-do-i-change-a-json-object-key/10089/2 "2019-04-13T03:22:23Z")

</div>

Just set new properties to the existing ones.

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

and so on.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [13 April 2019 05:17 UTC](https://discourse.nodered.org/t/how-do-i-change-a-json-object-key/10089/3 "2019-04-13T05:17:04Z")

</div>

Set will copy them  
So maybe use move instead ?
