---
title: "Looping through array data"
description: "Repeat array data in templates to display items on separate lines, inline, or as numbered and bullet lists that match your data."
canonical_url: "https://resources.docmosis.com/template-tutorials/repeating-sections"
last_reviewed: 2026-06-12
---
# Looping through array data
Repeating data, from an array of data, can be displayed in many ways.
This example contains: each item on a new line, each item on the same line, bullet lists, and numbered lists.
## Defining a repeating section
A repeating section starts with \<\\>...\<\\>
In your data you would have an array of objects like this (JSON example):
"people":\[{"name":"John"}, ... ] (JSON example).
So, \<\\>\<\\>\<\\>, is like saying:
FOR ***all people*** LOOP
***replace each \<\\> with data up to \<\\>***
If \<\\> appears on a line by itself.
The second example in the template shows how to list all of the names in a single line. To achieve this, the opening \<\\> field and the closing \<\\> is followed by a space, to provide a space between each name in the list.
### Numbered lists and bullet lists
The template also contains two lists.
The first is a numbered list, where the line containing \<\\> is formatted as a numbered list item.
The second is a bullet list, where the line containing \<\\> is formatted as a bullet point.
Each list grows to match the items in the data.
# Looping through array data - related json data
```json
{
"people":[
{"name":"John"},
{"name":"Susan"},
{"name":"Marcus"},
{"name":"Paul"},
{"name":"Huan"},
]
}
```
# Looping through array data - example template syntax
```docmosis
# Repeating Sections
\<\\>
\<\\>
\<\\>
\<\\>\<\\> \<\\>
\<\\>
1. \<\\>
\<\\>
\<\\>
- \<\\>
\<\\>
```