Nested loops

docMaker lets you create nested loops, without any limit in terms of depth of the loops.

The nested loops feature is very useful when you need to group your output by categories. They can be used inside tables or also for plain text, in order to repeat multiples lines inside main paragraphs.

Below is an example of this feature in a template.

The Bubble demo can be found here : demo | editor

In order to do that, you will have to create a nested loops JSON and nested loops in your template.

{β€œorders” : [
 {
   "name": "Order1",
   "orderLines": [
     {
       "item_name": "trousers",
       "item_quantity": 1,
       "item_price": 100,
     },
     {
       "item_name": "shirt",
       "item_quantity": 50,
       "item_price": 50,
     },
     {
       "item_name": "shoes",
       "item_quantity": 1,
       "item_price": 1,
     },
   ]
 },
 {
   "name": "Order2",
   "orderLines": [
     {
       "item_name": "socks",
       "item_quantity": 1,
       "item_price": 33,
     }
   ]
 }
]
}

Copy

Template

Result

Last updated