Skip to main content

$$repeat

Creates an array with the specified value repeated count times

Usage​

{ 
"$$repeat": /* Value to repeat */,
"count": /* integer */
}
"$$repeat(<count>):{input}"

Returns​

array - of same type as input

Arguments​

ArgumentTypeValuesRequired / Default ValueDescription
PrimaryanyYesValue to repeat
countintegerYesThe amount of times to repeat the value

Examples​

Input

Definition

Output

"A"
"$$repeat(3):$"
[
"A",
"A",
"A"
]
{
"value": "A",
"count": 3
}
"$$repeat($.count):$.value"
[
"A",
"A",
"A"
]
"A"
{
"$$repeat": "$",
"count": 3
}
[
"A",
"A",
"A"
]
{
"A": 2
}
{
"$$repeat": "$",
"count": 3
}
[
{
"A": 2
},
{
"A": 2
},
{
"A": 2
}
]