Skip to content
Brad Cannell edited this page Feb 14, 2023 · 6 revisions

Notes on working with Arrays.

Manually create an array

It can be useful, often for testing, to manually create an array. You can do so in an initialize variable step. For the value, type something like:

[
  "BMW",
  "Ford",
  "GMC",
  "Mercedes",
  "GMC",
  "Dodge",
  "BMW"
]

Here is a link to a flow you can use to experiment.

Select an array element

Use variables('myArray')[0] to select the first element of the array named myArray.

Sorting an array

Sorting arrays used to be really difficult and complicated. So far, the method described on this blog seems easy and effective.

  • sort(variables('myTasksArray'),'createdDateTime')

Array properties