# Transpose the Object/Array

**URL:** <https://discourse.nodered.org/t/transpose-the-object-array/72170>\
**Category:** General\
**Created:** [14 December 2022 08:28 UTC](https://discourse.nodered.org/t/transpose-the-object-array/72170 "2022-12-14T08:28:14Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [14 December 2022 09:31 UTC](https://discourse.nodered.org/t/transpose-the-object-array/72170/5 "2022-12-14T09:31:29Z")

</div>

Try setting msg.labels to JSONata J: `[$$.payload.R]`  
and then msg.payload to JSONata J: `[[$$.payload.D]]` or `[$$.payload.D.[$]]` in a change node.  
You have to set msg.labels first, as if you set payload the data will be overwrtten.

---

_[View the full topic](https://discourse.nodered.org/t/transpose-the-object-array/72170)._
