Modifying object variable name


I am having some trouble with this simple task:
I have a msg.payload like this:
"response": "221321312"
And I want to be able to change it for "WhateverIWant":"221321312" .
I have tried with change and switch but I am lost, it would be sweet if you can help me.
Thanks in advance!


Do you mean that:

msg.payload = {'response':'221321312"}

In other words, the payload is an object?

If so:

msg.payload = { 'WhateverIWant': msg.payload.response }


Thanks! I always forget about objects that was my error.