-1
I have a Json with the following structure:
{
"Data" {
"Request": [
{
"text": "Minha Pergunta?",
"response": "Minha resposta"
}
]
}
}
I do as follows to receive the values in the code:
IConfigurationSection result = _config.GetSection("Data").GetSection("Request");
var itemArray = result.AsEnumerable();
string valor;
Then I make a foreach to go through the whole list:
foreach (var item in itemArray)
{
valor = item.Value
}
However, in this way the variable valor
is receiving property value text
of my json array. I need to receive the value that is in response
How can I do?
Good, it worked, thank you very much
– Desalex