There is json . I try through Newtonsoftjson bring it to the class. Gives an error message. It seems to do everything as before. I do not understand what the error is
var m = JsonConvert.DeserializeObject<Rootobject>(json).Property1.Select(x=>x.value).ToList(); public class Rootobject { public Class1[] Property1 { get; set; } } public class Class1 { public string value { get; set; } public string label { get; set; } public string firm { get; set; } } [ { "value": "CL", "label": "CL", "firm": "ACURA" }, { "value": "CSX", "label": "CSX", "firm": "ACURA" } ] Newtonsoft.Json.JsonSerializationException: "Cannot deserialize the current JSON array (eg [1,2,3]) into the 'Rootobject' type .