Sending json arrays to post

How would you go about sending a nested object array inside of another object array?

ie:

“items”: [ //array info that needs to be sent

  • {
    “id”: 1,
    “external_id”: “item-1”,
    “variant_id”: 1,
    “sync_variant_id”: 1,
    “external_variant_id”: “variant-1”,
    “warehouse_product_variant_id”: 1,
    “quantity”: 1,
    “price”: “13.00”,
    “retail_price”: “13.00”,
    “name”: “”,
    “product”: {},
    “files”: [required nested array that also needs to be sent],
    “options”: [],
    “sku”: null,
    “discontinued”: true,
    “out_of_stock”: true}
    ],

if anyone was wondering, i got this by nesting format as texts

2 Likes