I have this JObject:
[{"Antibiotic after diagnosis": ["Azithromycin", "CeftriaXONE", "Cefpodoxime Proxetil", "Linezolid", "Vancomycin Oral Liquid", "Ciprofloxacin HCl", "Ampicillin Sodium"], "City": ["Tel Aviv", "Beersheba", "Jerusalem", "Haifa"], "Gendercode": ["M", "F", "E"]}]
I wanted to convert this JObject to regular object so i tried using ToObject() method:
Dictionary<string, object> dictObj = new Dictionary<string, object>();
dictObj = myJsonObj.ToObject<Dictionary<string, object>>();
But the code crushed with the folowing error:
JsonSerializationException: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'System.Collections.Generic.Dictionary`2[System.String,System.Object]' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
How do i convert my JObject to regular Object?