# JSON Message + Text Dashboard

**URL:** <https://discourse.nodered.org/t/json-message-text-dashboard/68113>\
**Category:** Dashboard\
**Created:** [23 September 2022 04:21 UTC](https://discourse.nodered.org/t/json-message-text-dashboard/68113 "2022-09-23T04:21:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aisutera](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@Aisutera](https://discourse.nodered.org/u/Aisutera)\
**Post date:** [23 September 2022 04:21 UTC](https://discourse.nodered.org/t/json-message-text-dashboard/68113/1 "2022-09-23T04:21:02Z")

</div>

Good afternoon everyone!

Can someone guide be about how to print JSON message beautifully using TEXT dashboard or other possible dashboard?

For instance will be something like this;  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/a/ba3ec36ef958b87f0c78831cd3e6acfc1f16ff87.png)

since right now I'm getting something like this.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/d/2d5506fe7514a7d1c275c06eb24f5cc3ff89ab71.png)

Thanks in advanced for your help!

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [23 September 2022 08:26 UTC](https://discourse.nodered.org/t/json-message-text-dashboard/68113/2 "2022-09-23T08:26:16Z")

</div>

You can use the Json node set to format json string or [JSON.stringyfy()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) to output pretty Json.  
e.g.

```auto
[{"id":"586d5dc3.93661c","type":"inject","z":"20bb0f7f9fab47a8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"text1\":\"text1\",\"text2\":\"text2\"}","payloadType":"json","x":140,"y":620,"wires":[["5459f2fa.d5e2f4","13594dec.b8ac82"]]},{"id":"13594dec.b8ac82","type":"json","z":"20bb0f7f9fab47a8","name":"","property":"payload","action":"","pretty":true,"x":360,"y":600,"wires":[["3e0ad2eb.1a47ae"]]},{"id":"5459f2fa.d5e2f4","type":"function","z":"20bb0f7f9fab47a8","name":"","func":"msg.payload = JSON.stringify(msg.payload, null, 2); \nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":430,"y":660,"wires":[["3e0ad2eb.1a47ae"]]},{"id":"3e0ad2eb.1a47ae","type":"debug","z":"20bb0f7f9fab47a8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":510,"y":800,"wires":[]}]

```

output

```auto
{
  "text1": "text1",
  "text2": "text2"
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [23 October 2022 08:26 UTC](https://discourse.nodered.org/t/json-message-text-dashboard/68113/3 "2022-10-23T08:26:44Z")

</div>

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