I have 2 list of dictionaries with the same values. I want to remove 1 value.
This is how it looks:
[
{
"activity_name": "Wait Time",
"task_detail": [
{
"created_date": "2021-04-29 10:00:25.695254",
"row_id": ""
}
]
},
{
"activity_name": "Wait Time",
"task_detail": [
{
"created_date": "2021-04-29 10:28:42.131017",
"row_id": ""
}
]
}
]
Here is my code:
result=[]
for gc_item in gc_response['Items']:
for sch_act in gc_item['scheduled_activity']:
result.append(sch_act)
How to remove duplicate value for this? Under Scheduled_activity only i have the value(Activity name and task_detail)
I need to remove 1 of the duplicate value. The output should be:
{
"activity_name": "Wait Time",
"task_detail": [
{
"created_date": "2021-04-29 10:28:42.131017",
"row_id": ""
}
]
}