-1

I would like to be able to convert an array to strings i bicep

Let say i have an array:

    param arraytest array = [
    'numberOne'
    'numberTwo'
    ]

I would like to be able to convert this array to strings, så when i put the arraytest in a new array, that only excepts strings, it will not complain

so like this:

    destination: [
    arraytest 
    'numberThree'
    ]
Nadia Hansen
  • 697
  • 2
  • 6
  • 16
  • Are you trying to concatenate array ? Sorry it's unclear what your asking but the answer from @JustAGuy should help if you d like to concatenate arrays. – Thomas May 07 '22 at 07:32

1 Answers1

1

I think what you are looking for is the concat function.

https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-functions-array#concat

var destination = concat(arraytest, [
'numberThree'
])
JustAGuy
  • 151
  • 4