I want to create a custom Task for Azure DevOps and I would like to have an array of object as parameters and use it like this in yaml:
data:
- field1: "data1"
field2: "data2"
- field1: "data3"
field2: "data4"
However I didn't found any avalable methods or examples for this kind of case, only simple array like string array. How an I pass a listof object from yaml to my custom Azure DevOps task? Feel free to ask me some more details if needed.
EDIT:
For example, I want to send a complexe lisf of object:
data: # Data should be an array
- object:
file1: "/myDestinationPath"
file2: "/TheFilePathToSend"
override: true
- object:
file1: "/myDestinationPath2"
file2: "/TheFilePathToSend2"
override: false
...
Then I expect to load it, something like:
let dataArray = task.getPathInput('data', true);
Where dataArray can ba a simple JSON array, it will be easy to manage after.