These are my classes:
public class Rootobject
{
public Test[] tests { get; set; }
public Pagination pagination { get; set; }
}
public class Pagination
{
public int total_records { get; set; }
public int total_pages { get; set; }
public int current_page { get; set; }
}
public class Test
{
public string id { get; set; }
public string num { get; set; }
public string name { get; set; }
public DateTime created { get; set; }
}
and my code to deserialise:
var Jsonobject = JsonConvert.DeserializeObject<Rootobject>(jsonText);
Rootobject _obj = (Rootobject)Jsonobject;
var result = (
from Item in Jsonobject.tests
select new Test
{
id = Item.id,
num = Item.num,
name = Item.name,
created = Item.created,
}).ToList();
The next step I have is to populate these into excel. How do I do that? I am a beginner and need some guidance please. Can anyone help me with any suggestions. Thank you.