I have the following json object and in c# I want to read each record and output the name of the field and the value of the field. I know how to do it by pulling into c# prefined classes, but I am wondering if I can do it without knowing the field names in advance? Not sure how I would go about that in c#?
[
{
“CustomerId”: 2,
“CustomerName”: “Bob”,
“Address1”: “2100 3rd Ave”,
“CSZ”: “Albany, NY 55303”,
},
{
“CustomerId”: 4,
“CustomerName”: “Steve”,
“Address1”: “701 Main St”,
“CSZ”: “Bangor, ME 24244”,
},
{
“CustomerId”: 13,
“CustomerName”: “Albert”,
“Address1”: “313 N Main St”,
“CSZ”: “Bakersfield, CA 25012”,
},
{
“CustomerId”: 60,
“CustomerName”: “Sally”,
“Address1”: “612 North Broadway”,
“CSZ”: “Somewhere, IA 24216”,
}
]