I hope you can help me. I'm trying to deserialize a response object into a dynamic object in C#. The code goes as follow:
var result = await message.Content.ReadAsStringAsync();
dynamic response = JsonConvert.DeserializeObject<dynamic>(result);
foreach (dynamic backgroundTaskURL in response)
{
filaUPloads.Add(backgroundTaskURL.href);
}
The response dynamic object above has the following value:
{{
"href": "/me/background-tasks/77fa9922-5a1b-4fce-ada4-7c5c5d093270"
}}
At the first foreach interaction, the backgroundTaskURL dynamic object reads:
{
"href": "/me/background-tasks/77fa9922-5a1b-4fce-ada4-7c5c5d093270"
}
For some reason I'm not able to understand, the backgroundTaskURL dynamic object is not resolving the "href" property.
Please advise! Thanks!