I am trying to figure out a way to deserialize Json object of type:
{
"0": { "course": { name: "<cource name", .... } },
"1": { "course": { name: "<cource name", .... } },
"success": true
}
into
List<Course>
where
public class Course
{
public string Name { get; set; }
}
The problem is that it is not a "named" array and it has indexes in place of property name. This array is dynamic, that is contain many elements, i.e. "0", "1", "2", etc. Is there an easy way to deserialize it via Json.NET. I can obviously deserialize it to dynamic object and then create a a for loop and lookup index one by one, but I thought Json.Net might have something more elegant for this.