Articles on: Q&A

How to create Nested Array (Multidimensional Array)?

Nested Array is a wide-spread method to iterate an array inside another array. If you want to create a nested array you need to place a Container Component (or Table Component) inside another Container Component where one of them would have data field of the main array and the one inside would have nested array data.

The Outer Array (Container Component)


In this case The Outer Array represents different Orders and it is necessary to set the Container's data field to Orders (type Array).

The Inner Array (Table Component)


The Inner Array represents different Line_Items in corresponding Orders. In this case we have used a Table Component to represent the Inner Array. (it is possible to use a Container Component as well). It is also necessary to set the Table's data fields to Line_Items as you can see in the picture.

Preview


As you can see in the preview there were generated two different orders with corresponding line_items listed in the Table Component.

Updated on: 17/01/2022

Was this article helpful?

Share your feedback

Cancel

Thank you!