Python - Delete Json Object from Json Array in a loop and update JSON file on the go
Budget: ₹600 – ₹1,500 INR
I have a json file - demo.json (file attached)
I continuously upload the data within this json file using the function - upload_products (file attached)
Now I want to modify this function such that, let say when one of the UPC is uploaded, I want to delete that UPC object from JSON Array. And if it was failed to upload due to some reason then it should not delete.
For ex. data has 50 json objects
on running 48 UPC's were uploaded
so now the data.json should only have 2 json objects
I continuously upload the data within this json file using the function - upload_products (file attached)
Now I want to modify this function such that, let say when one of the UPC is uploaded, I want to delete that UPC object from JSON Array. And if it was failed to upload due to some reason then it should not delete.
For ex. data has 50 json objects
on running 48 UPC's were uploaded
so now the data.json should only have 2 json objects