How do I convert a string of json formatted data into an anonymous object?
using Newtonsoft.Json, use DeserializeAnonymousType:
string json = GetJsonString();
var anonType = new { Order = new Order(), Account = new Account() };
var anonTypeList = new []{ anonType }.ToList(); //Trick if you have a list of anonType
var jsonResponse = JsonConvert.DeserializeAnonymousType(json, anonTypeList);
Based my answer off of this answer: https://stackoverflow.com/a/4980689/1440321