# Remove \[\] from an output

**URL:** https://discourse.nodered.org/t/remove-from-an-output/27507
**Category:** General
**Created:** [29 May 2020 18:00 UTC](https://discourse.nodered.org/t/remove-from-an-output/27507 "2020-05-29T18:00:46Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![trocalos](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trocalos/32/64540_2.png) [@trocalos](https://discourse.nodered.org/u/trocalos)
#### Post date: [29 May 2020 18:00 UTC](https://discourse.nodered.org/t/remove-from-an-output/27507/1 "2020-05-29T18:00:47Z")

</div>

Hello, I am trying to remove the brackets `[]` at the output of my payload

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/3/e3f98d7281a73b51de243e690bdd6ef5f7aa6bfa.png)

If I get "27" or "25" it gives me a text result, but the problem is that the sensor reading gives me ["27.500"]

How can I remove those `[]`?

Thank you

---

<div class="post-metadata">

### Author: ![trocalos](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trocalos/32/64540_2.png) [@trocalos](https://discourse.nodered.org/u/trocalos)
#### Post date: [29 May 2020 18:05 UTC](https://discourse.nodered.org/t/remove-from-an-output/27507/2 "2020-05-29T18:05:02Z")

</div>

I have tried with a change function

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/6/86d3149ffc87da63e8b338c4f8fac78e60696797.png)  
but

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/4/54c2dfecbce265154e4191fa9c402a6def7f2cd8.png)

---

<div class="post-metadata">

### Author: ![JGKK](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jgkk/32/18515_2.png) [@JGKK](https://discourse.nodered.org/u/JGKK)
#### Post date: [29 May 2020 18:10 UTC](https://discourse.nodered.org/t/remove-from-an-output/27507/3 "2020-05-29T18:10:13Z")

</div>

You are receiving a json string representation of an array. You can select in the mqtt node to automatically parse this to a javascript object.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/2/2270cea222f74b6ff383827db988f1783d9a687a.jpeg)  
Once you have done this you can copy the path to the element in the array from the debug sidebar and use this path in a change node to set your payload to that element.

---

<div class="post-metadata">

### Author: ![trocalos](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trocalos/32/64540_2.png) [@trocalos](https://discourse.nodered.org/u/trocalos)
#### Post date: [29 May 2020 18:17 UTC](https://discourse.nodered.org/t/remove-from-an-output/27507/4 "2020-05-29T18:17:46Z")

</div>

Perfect, it worked for me the first time.

Many thanks

---

<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: [28 July 2020 18:24 UTC](https://discourse.nodered.org/t/remove-from-an-output/27507/5 "2020-07-28T18:24:48Z")

</div>

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