I have a dynamic object that looks like this,
{ \"2\" : \"foo\", \"5\" : \"bar\", \"8\" : \"foobar\" }
How can I convert this
You can do it with jsonSerializer. And it requires System.Net.Extensions reference. Here is a sample code.
var jss = new JavaScriptSerializer(); var dict = jss.Deserialize<Dictionary<string,string>>(jsonText); var place = dict["8"]; // "foobar"