# Stored Data into Array for Line Chart

**URL:** <https://discourse.nodered.org/t/stored-data-into-array-for-line-chart/1976>\
**Category:** General\
**Created:** [1 August 2018 15:25 UTC](https://discourse.nodered.org/t/stored-data-into-array-for-line-chart/1976 "2018-08-01T15:25:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![demillertime](https://avatars.discourse-cdn.com/v4/letter/d/dbc845/32.png) [@demillertime](https://discourse.nodered.org/u/demillertime)\
**Post date:** [1 August 2018 15:25 UTC](https://discourse.nodered.org/t/stored-data-into-array-for-line-chart/1976/1 "2018-08-01T15:25:50Z")

</div>

Hello all,

First post noobie here. I am looking for a method to take a string of values from a stored data file in the format:

{"timestamp":"2018-07-31T18:38:44.613Z","timeinstate":0}  
{"timestamp":"2018-07-31T18:38:45.435Z","timeinstate":0}  
{"timestamp":"2018-07-31T18:38:46.146Z","timeinstate":0}  
{"timestamp":"2018-07-31T18:38:47.069Z","timeinstate":0}  
{"timestamp":"2018-07-31T18:38:47.430Z","timeinstate":5}  
{"timestamp":"2018-07-31T18:38:47.563Z","timeinstate":5}

And pass this as an array into a line chart to plot my historical saved data. I know this is a dashboard help but the method to get it to an array isn't necessarily a dashboard function. There is not a very good tutorial on this and I have been struggling with it for the past 2 days. Any help would be appreciated (these data points were made up for this example, it could be something like temperature, humidity etc...)

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [2 August 2018 12:05 UTC](https://discourse.nodered.org/t/stored-data-into-array-for-line-chart/1976/2 "2018-08-02T12:05:57Z")

</div>

Maybe you can find something helpful from this thread [https://discourse.nodered.org/t/more-chart-questions-sorry-folks/1822](https://discourse.nodered.org/t/more-chart-questions-sorry-folks/1822)

---

<div class="post-metadata">

**Author:** ![demillertime](https://avatars.discourse-cdn.com/v4/letter/d/dbc845/32.png) [@demillertime](https://discourse.nodered.org/u/demillertime)\
**Post date:** [13 August 2018 15:39 UTC](https://discourse.nodered.org/t/stored-data-into-array-for-line-chart/1976/3 "2018-08-13T15:39:11Z")

</div>

Thank you, I got it to work. Instead of storing as JSON I stored at a single line separated by a dash and then just split the messages one at a time using that delimiter and sent to the chart.
