I have a Json string
"[{'SymptID': '" + MidID + "', 'ALvl' : '" +JawLvl + "'},
{'SymptID': '" + BckID + "', 'ALvl' : '" + PanLvl + "'},
{'SymptID': '" + SysID + "', 'ALvl' : '" + wPLvl + "'}]"
Dictionary<string, string> Symptoms =
(Dictionary<string, string>)Newtonsoft.Json.JsonConvert.DeserializeObject(
data, typeof(Dictionary<string, string>));
foreach (KeyValuePair<string, string> keyValuePair in Symptoms)
{ //do some action }
how can make this get keys and values with this multiple array json data... is there any other methods.
NOTE:The question is not a duplicate to How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?, because json structure is different.
Here we have an array of objects with 2 properties SymptID and ALvl, that need to be converted to dictionary with key SymptID and value ALvl. Referred question has one object with multiple properties having corresponding values that needs to be converted to dictionary with property name as key and property value as value in dictionary.