I have dictionary in python script like this
{key:value}
{key:value}
{key:value}
I wanted to make it into a single key dictionary like
[{'key':value} , {'key:value} , {'key':value}......]
My code is below:
for (recActorIMDBid, recActorName, recActorTopTen) in cursor:
recActorTopTen = str(recActorTopTen).replace(",", "_ ")
contentIDArray =[]
contentIDArray = recActorTopTen.split("_ ")
if len(contentIDArray) > 9:
stringOut = "ID," + str(recID) + ",IMDB ID," + str(recActorIMDBid) + ",NAME," + str(recActorName) + ",TOP TEN," \ + str(recActorTopTen)
print(stringOut)
I need to change the result to json, what should I Do?