I'm trying to get the property of this json:
{
"dateFrom": "2021-01-01",
"dateTo": "",
"totalOrderCount": 2,
"ordersPerPage": 1000,
"pageNumber": 1,
"error": null,
"orders": {
"50000": {"offerId": 595},
"50001": {"offerId": 595}
}
}
This is my code:
string content = "{... json ...}";
dynamic data = JObject.Parse(content);
dynamic GartnerOrders = data.orders;
With that I can acces the orderId like this:
foreach (var order in orders)
{
string offerId= order.Last.offerId;
}
But how do I get the orderNo? Here 50000 and 50001