I have a nested object in which some values are arrays of objects. These objects have one field as a File. Here's the object structure.
{
"shop_name":"Organic Farm Shop",
"shop_logo": File,
"description":"Lorem ipsum dolor sit amet consectetur adipisicing elit. ",
"category":"Grocery",
"shop_url":"organic-farm",
"product_details":[
{
"product_name":"Fresh Carrots",
"product_image": File,
"price":45,
"stock":10,
"unit":"Kg",
"catogoryName":"Frozen Foodss"
},
{
"product_name":"Fresh Cucumbers",
"product_image": File,
"price":80,
"stock":20,
"unit":"Kg",
"catogoryName":"Frozen Foodss"
}
],
"page_input":[
{
"inputLabel":"Address",
"inputType":"multiline_text"
},
{
"inputLabel":"Mobile Number",
"inputType":"numbers"
}
]
}
How do I append this to FormData? Or is there a better way to do this without using FormData?