# About iterate nested array json

**URL:** <https://www.singlestore.com/forum/t/about-iterate-nested-array-json/7251>\
**Category:** JSON\
**Tags:** developer\
**Created:** [October 24, 2023, 9:22am UTC](https://www.singlestore.com/forum/t/about-iterate-nested-array-json/7251 "2023-10-24T09:22:20Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![hanson](https://www.singlestore.com/forum/user_avatar/www.singlestore.com/hanson/32/196_2.png) [@hanson](https://www.singlestore.com/forum/u/hanson)\
**Post date:** [October 25, 2023, 12:17am UTC](https://www.singlestore.com/forum/t/about-iterate-nested-array-json/7251/2 "2023-10-25T00:17:21Z")

</div>

Check out my reply to your related post. Does that answer your question?

> [@How to merge multiple arrays in one?](https://www.singlestore.com/forum/t/how-to-merge-multiple-arrays-in-one/7253/2):
>
> Here’s one way to do it: create table t(id int, j json); insert t values (1 , '["label\_1", "label\_2"]'), (2 , '["label\_3", "label\_4"]'); with r as ( select id, x.table\_col as c from t join table(json\_to\_array(j)) as x ) select json\_agg(c) from r; Result: +-------------------------------------------+ | json\_agg(c) | +-------------------------------------------+ | ["label\_1","label\_2","label\_3","label\_4"] | +-------------------------------------------+

---

_[View the full topic](https://www.singlestore.com/forum/t/about-iterate-nested-array-json/7251)._
