Beginner inquiry: I am exploring node-red and believe it could serve as a valuable introduction to node.js (and javascript in general). However, I've hit a roadblock.
I have built a flow that executes a basic query on a mysql database. While I'm receiving the results, I am having trouble parsing them effectively. It seems like the results are returned in an array format, but I'm unsure how to access and manipulate this array within a function. Below is the data sent from the mysql node:
[
{ "at_time": "2017-03-27T18:33:46.000Z", "event": "gone_to_bed" },
{ "at_time": "2017-03-27T22:14:02.000Z", "event": "woke_up" },
{ "at_time": "2017-03-27T22:14:12.000Z", "event": "food" },
{ "at_time": "2017-03-28T00:13:42.000Z", "event": "woke_up" },
{ "at_time": "2017-03-28T03:50:15.000Z", "event": "woke_up" },
{ "at_time": "2017-03-28T05:12:33.000Z", "event": "woke_up" },
{ "at_time": "2017-03-28T05:12:38.000Z", "event": "food" },
{ "at_time": "2017-03-28T06:56:29.000Z", "event": "up_for_day" },
{ "at_time": "2017-03-28T18:08:49.000Z", "event": "gone_to_bed" },
{ "at_time": "2017-03-28T18:32:48.000Z", "event": "woke_up" }
]
Appreciate any guidance!