I writing app for Windows 10.
I have connection with WooCommerce with WooCommerce.Net plugin
Here it is plugin
I have JSON string.
Code:
RestAPI rest = new RestAPI("http://simplegames.com.ua/wp-json/wc/v1/", "ck_9d64c027d2c5f81b8bed3342eeccc6d337be813d", "cs_60697b1e6cbdeb8d62d19e0765e339f8e3334754");
WCObject wc = new WCObject(rest);
//Получение заказов
var orders = await wc.GetOrders()
string products = orders[1].line_items.ToFormattedJsonString();
Debug.WriteLine(products);
I have this JSON in Console
[
{
"id": 72,
"name": "Із лосося",
"sku": "344",
"product_id": 1134,
"variation_id": 0,
"quantity": 1,
"tax_class": "",
"price": 75.00,
"subtotal": 75.00,
"subtotal_tax": 0.00,
"total": 75.00,
"total_tax": 0.00,
"taxes": [
],
"meta": [
]
},
{
"id": 73,
"name": "Італьяно",
"sku": "340",
"product_id": 1138,
"variation_id": 0,
"quantity": 1,
"tax_class": "",
"price": 38.00,
"subtotal": 38.00,
"subtotal_tax": 0.00,
"total": 38.00,
"total_tax": 0.00,
"taxes": [
],
"meta": [
]
}
]
I need to write value from this JSON
for example name to variable.
How I can do this?