I am trying to implement an array of JSON objects in my local.settings.json file for my Azure function. The default file looks like this:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "Default",
"AzureWebJobsDashboard": "Default",
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
}
I know that any values added to the values section can be extracted in my .cs file using Environment.GetVariable(). However I would like to add an array like this:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "Default",
"AzureWebJobsDashboard": "Default",
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
},
"data": [
{
"attribute" : "details"
"attribute2": "details"
},
{
"attribute" : "details"
"attribute2": "details"
}
]
}
I don't think it's possible to add this data array to the values section, since it's expected to be a dictionary. How can I access the data array in my .cs file? I would like it to be in this format, due to the ease of adding objects when needed and the code will handle the changes with a loop since it is an array.