# Split Json Array and send it to grafana

**URL:** <https://discourse.nodered.org/t/split-json-array-and-send-it-to-grafana/42880>\
**Category:** General\
**Created:** [19 March 2021 13:08 UTC](https://discourse.nodered.org/t/split-json-array-and-send-it-to-grafana/42880 "2021-03-19T13:08:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![edwardradical](https://avatars.discourse-cdn.com/v4/letter/e/a87d85/32.png) [@edwardradical](https://discourse.nodered.org/u/edwardradical)\
**Post date:** [19 March 2021 13:08 UTC](https://discourse.nodered.org/t/split-json-array-and-send-it-to-grafana/42880/1 "2021-03-19T13:08:48Z")

</div>

Hi guys! I'm really new here and I got a question, I hope it's easy to understand but I don't know how to explain it well.

I've got a MQTT node that receive a JSON array with 10 JSON Object of 4 values. Something like this

> [  
> {"AcX": 1625, "AcY": -225, "AcZ": 1235, "time": 3000},  
> {"AcX": 1625, "AcY": -25, "AcZ": 1556, "time": 6000},  
> {"AcX": 1625, "AcY": -132, "AcZ": 1789, "time": 9000},  
> {"AcX": 1625, "AcY": -67, "AcZ": 345, "time": 12000}  
> ....  
> ]

Then I feed the JSON Array into a 'Split node' to send every single object to influxdb and then display the values in grafana. The problem is that the 4th value of the object (time) is not taken care and when I display the values in grafana they collapse into one point because the timestamp value is not read. How should I solve this? Is there some function that I could write ore else? Every value in the object is read after 3 seconds. Thanks a lot!

---

<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:** [19 March 2021 13:23 UTC](https://discourse.nodered.org/t/split-json-array-and-send-it-to-grafana/42880/2 "2021-03-19T13:23:44Z")

</div>

Your "time" value is not a timestamp and so InfluxDB treats it just like another number. If you want InfluxDB to use the time value as the timestamp to store the other values against, you will need to convert that number into a timestamp that InfluxDB recognises. Check out the InfluxDB website on what format to use.

---

<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:** [18 May 2021 13:24 UTC](https://discourse.nodered.org/t/split-json-array-and-send-it-to-grafana/42880/3 "2021-05-18T13:24:19Z")

</div>

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