My goal is to completely change the listings field
Structure in the database:
{ "other":{ "price": 0, "isFrozen": false, }, "listings": { "price": 0, "isFrozen": false, "isLocked": false, "pricings": [], "isSalable": false, "listingId": "c2520a55-83fa-4989-a219-ac0efb13bf9a", "isSuspended": false, "lockReasons": [], "merchantSku": "AAAQKIRMIZIL", "dispatchTime": 0 } }
I've been trying something like this but no results I am trying to update according to the information returned from the API. The type of response['listings'][0] is dict.
update products set column_name= JSON_REPLACE(column_name, '$.listings', "+response['listings'][0]+") where id='"+str(id)+"'