Question in a few parts!
Q1
[
{
"body": {
"code": 0,
"message": "success",
"invoice": {
"invoice_id": "2441836000002145001",
"line_items": [
{
"line_item_id": "100",
"item_id": "100",
"sku": "SN-WI-005-DEVICE",
"quantity": 10,
},
{
"line_item_id": "200",
"item_id": "200",
"sku": "SN-WI-003-DEVICE",
"quantity": 20,
}
],
"exchange_rate": 1,
"contact_persons_details": [
{
"contact_person_id": "1",
"first_name": "",
"last_name": ""
},
{
"contact_person_id": "2",
"first_name": "Emma",
"last_name": "Jones"
}
]
}
},
"statusCode": 200
}
]
Q2
How can I manipulate it into this:
sku_array = ["SN-WI-005-DEVICE", "SN-WI-003-DEVICE"]
Q3
Additionally, is it possible to append this to an existing array and dedup it? So you might get :
sku_array_ext = ["SN-WI-005-DEVICE","SN-WI-004-DEVICE", "SN-WI-003-DEVICE"]