# How to create msg keys?

**URL:** <https://discourse.nodered.org/t/how-to-create-msg-keys/51777>\
**Category:** General\
**Created:** [2 October 2021 12:48 UTC](https://discourse.nodered.org/t/how-to-create-msg-keys/51777 "2021-10-02T12:48:51Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![waquete](https://avatars.discourse-cdn.com/v4/letter/w/a698b9/32.png) [@waquete](https://discourse.nodered.org/u/waquete)\
**Post date:** [2 October 2021 14:37 UTC](https://discourse.nodered.org/t/how-to-create-msg-keys/51777/11 "2021-10-02T14:37:52Z")

</div>

ah ok, this rewrite the whole msg.  
I could use maybe:

```auto
msg.payload = {};
msg.payload.chatId : 11111111111;
msg.payload.type : "message";
msg.payload.content : "Hello World";

```

or directly:

```auto
msg.payload = {};
msg.payload = { chatId : 11111111111 , type : "message" , content : "Hello World" };

```

---

_[View the full topic](https://discourse.nodered.org/t/how-to-create-msg-keys/51777)._
