Nested arrays

Repeat nested arrays are managed at unlimited depth. The following example shows a repetition of a whole document.

It is not necessary to completely repeat the first paragraph twice in the templateβ€”repeat only the title of the second paragraph to detect where the repetition pattern of the main array ends {d.cars[i+1].brand}.

Data

[
  {
    brand: "Toyota",
    models: [{ size: "Prius 2" }, { size: "Prius 3" }]
  },
  {
    brand: "Tesla",
    models: [{ size: "S" }, { size: "X" }]
  }
];

{d[i].brand}

Models

{d[i].models[i].size}

{d[i].models[i+1].size }

{d[i+1].brand}

Last updated