Generate JSON array
ActionsTags
(2)Generate JSON array of length
- name: Generate Array
id: list
uses: yakubique/generate-array@v1.3
with:
length: 10
startIndex: 1
template: "$item-{{index}}"
# "["$item-1","$item-2","$item-3","$item-4","$item-5","$item-6","$item-7","$item-8","$item-9"]"
INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
---|---|---|---|---|
length | string | true | Array length | |
negativeOnly | string | false | "false" |
Return only negative values |
positiveOnly | string | false | "false" |
Return only positive values |
startIndex | string | false | "0" |
What should be first index (default: 0) |
template | string | false | By default array values are indexes, can be customized with template. Example: "item-{{index}}" |
|
to_file | string | false | "false" |
Save result to file |
OUTPUT | TYPE | DESCRIPTION |
---|---|---|
result | string | Result array |
Generate JSON array is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.