How can I get appsettings.json
data by using Microsoft.Extensions.Configuration?
My appsettings.json file is:
"Test": [
{
"A": "101",
"B": "6390"
},
{
"A": "101",
"B": "6391"
},
{
"A": "101",
"B": "6392"
}
]
when is use
Configuration.GetSection("Test").GetChildren()
I get the error:
System.Linq.Enumerable+SelectEnumerableIterator`2[System.String.Microsoft.Extensions.Configuration.IConfigurationSection]
I cannot understand how to proceed with this error. Please ask if any info needed. The question is not a duplicate as i cannot run the code properly and it stops debugging and gives the error i mentioned.
Oh, and the actual error (as shown by the console) was:
Uncaught SyntaxError: Invalid or unexpected token