My data is as follows.
[
{
"id" : "123",
"type" : "process",
"entity" : "abc"
},
{
"id" : "456",
"type" : "product",
"entity" : "ab"
}
]
I am looping, although it looks like this: id and entity
for test in serializer.data:
qaResultUnique['id'] = test['id']
qaResultUnique['entity'] = test['entity']
uniqueList.append(qaResultUnique)
but getting the wrong conclusion as soon as getting the second dictionary both times.
[
{
"id" : "456",
"entity" : "ab"
},
{
"id" : "456",
"entity" : "ab"
}
]
What am I doing wrong, please help.
Pawan source
share