I have a text file that contains json formated text like shows below
[{"products":[{"product_id":"53743443003","quantity":4,"unit_price":42.71}],"value":170.84,"customer":{"id":58}},{"products":[{"product_id":"53743800103","quantity":8,"unit_price":36.78},{"product_id":"frontline-spot-on-Dog-3-1-10","quantity":4,"unit_price":24.62},{"product_id":"53743918500","quantity":7,"unit_price":18.44},{"product_id":"54993530183","quantity":1,"unit_price":57.44},{"product_id":"54993513347","quantity":10,"unit_price":5.0}],"value":629.24,"customer":{"id":18}},{"products":[{"product_id":"53743911105","quantity":8,"unit_price":22.97},{"product_id":"81572503779","quantity":8,"unit_price":63.0},{"product_id":"53743935308","quantity":1,"unit_price":61.96}],"value":749.72,"customer":{"id":53}}
sorry for the long line, but you get the point. this text file is quite large, containing around 200 different "customers"
While working in a console application in c#, i wish to modify the data around so that i can output it into the console as a json file would display, and/ or be able too out put only one type of object, for example "product_id".
products": [
{
"product_id": "53743800103",
"quantity": 8,
"unit_price": 36.78
},
{
"product_id": "frontline-spot-on-Dog-3-1-10",
"quantity": 4,
"unit_price": 24.62
},
{
"product_id": "53743918500",
"quantity": 7,
"unit_price": 18.44
},
{
"product_id": "54993530183",
"quantity": 1,
"unit_price": 57.44
},
{
"product_id": "54993513347",
"quantity": 10,
"unit_price": 5.0
}
],
"value": 629.24,
"customer": {
"id": 18
}
}
How could i do this?