# JSONata object creation (with $each?)

**URL:** <https://discourse.nodered.org/t/jsonata-object-creation-with-each/63903>\
**Category:** General\
**Created:** [14 June 2022 09:46 UTC](https://discourse.nodered.org/t/jsonata-object-creation-with-each/63903 "2022-06-14T09:46:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [14 June 2022 11:51 UTC](https://discourse.nodered.org/t/jsonata-object-creation-with-each/63903/2 "2022-06-14T11:51:16Z")

</div>

Welcome...

try this thread, it may lead to what you want..

> [@MySQL to dashboard chart - change function](https://discourse.nodered.org/t/mysql-to-dashboard-chart-change-function/14418/2):
>
> connect a change node to the output of the mysql node. in the change node select the j: expression option (the j: is for jsonata) click the three dots on the right of the tab and it will open up. paste in the code from Steve's example [{ "series": ["kW"], "labels": ["kW Used Today"], "data": [[payload.{ "x": captureTime, "y": $."kW Used Today" }]] }] and in your case change captureTime to time and kW Used Today to value and change the series and labels test t…

---

_[View the full topic](https://discourse.nodered.org/t/jsonata-object-creation-with-each/63903)._
