I'm trying to return a dynamic object deserialized from a json string. At runtime I don't know what the object looks like so I can't type it.
I've tried this:
var json = @"[{""clientNumber"":""3052394"",""accountStatus"":""Active""},{""clientNumber"":""1700630"",""accountStatus"":""Active""}]";
dynamic result = JsonConvert.DeserializeObject(json);
return Json(result, JsonRequestBehavior.AllowGet);
But the result comes out like this:
[[[[]],[[]]],[[[]],[[]]]]
I know I can do this:
var result = new{...};
But this won't work an I don't know what the object is looking like at runtime.