I want to build json in following format
{
"codeTableData":
[
{
"codeValue": "11",
"codeDisplayName": "AAAAAA"
},
{
"codeValue": "22",
"codeDisplayName": "BBBBBB"
}
]
}
from tuple which is
result = [('11', 'AAAAAA'), ('22', 'BBBBBB'), ('33', 'CCCCCCCC')]
I have tried creating dictionary and then adding tuple data inside that dictionary but still no luck
jsonResult = {"codeTableData: " [
{
tmp1:tmp2
},
]}
json_data = json.dumps(jsonResult)
for above code program execution comes out of function with no error shown