I am looking to parse JSON into a C# List. The problem is that the data I am trying to parse is not coming in Array format. Following is the sample JSON
{
"results":{
"records":{
"record:8545314564":{
"name":"record 1",
"description":"description for record 1"
},
"record:2254698789":{
"name":"record 2",
"description":"description for record 2"
},
"record:7454687851":{
"name":"record 3",
"description":"description for record 3"
}
}
}
}
My Model class looks something like this
public class Record
{
public string Name { get; set; }
public string Description { get; set; }
}
What I am looking for is to create a
List<Record> Records
I don't care about the name of the records child node (i.e record:8545314564, record:2254698789 etc). All I care about is the name and description property inside each record node.
I would really appreciate if someone can please provide a sample code in C# to achieve this desired output.
