I have an array of objects in a crate table and when I make a SELECT and fetchall() command, it gives me the following list of dictionaries:
[{"key": "two", "id": "1", "value": "three", "tag": False}, etc..]
After that I want to change a value from one of these dictionaries and update the array using sql UPDATE. In hard-code it should look like this:
cur.execute('UPDATE servers SET
tags =[{key= "two", id= "1", value= "three", tag= False}, etc..]')
It means that I have to parse this dictionary:
{"key": "two", "id": "1", "value": "three", "tag": False}
Into a string like this:
{key = "two", id = "1", value = "three", tag = False}
No " for the keys, = instead of : . How could I do it in python?