I've read a few posts on how to do this, but everything that i've seen the JSON object has specific property names to query, where i do not.
Here is my JSON string:
{
"424406": true,
"425171": true,
"411961": true
}
I want to loop through the array and read the string and bool field in separately (the JSON string is stored in a hidden variable, then accessed in my asp.net code behind):
dynamic dynObj = JsonConvert.DeserializeObject(partDetailsSelectedItems.Value);
foreach (dynamic x in dynObj)
{
string Id = ????
bool boolValue = ???
}
how do i get each of the 2 objects in "x" without specifying the name?
Ideally, i'd like to convert this stringified JSON into a generic list
List<string,bool>
but i need to understand how to handle my above scenario.