Below is the sample input from a huge file of similar inputs.
{
"V-Su7890": [
[
{
"url": "www.talent.com",
"tid": "V-Su7890",
"id": "58ff787ffbad487b2c",
"company_name": "Talent Ltd"
}
],
[
{
"socials": ["facebook", "linkedin", "twitter"],
"title": "title of the pag",
"contact": ["+9563802140"],
"email": "email_id1"
},
{
"socials": ["facebook", "twitter", "linkedin"],
"title": "next title of the page",
"contact": ["+919765983442"],
"email": "email_id2"
}
]
]
}
I have to merge all subdictionaries of the second list of the current dictionary into one dictionary without duplicate values and then store the dictionary as a value to the key "V-Su7890".
The desired output is :
{
"V-Su7890": [
[
{
"url": "www.talent.com",
"tid": "V-Su7890",
"id": "58ff787ffbad487b2c",
"company_name": "Talent Ltd"
}
],
[
{
"socials": ["facebook", "linkedin", "twitter"],
"title": ["title of the pag", "next title of the page"],
"contact": ["+9563802140", "+919765983442"],
"email": ["email_id","email_id2"]
}
]
]
}
Kindly help me understand and solve this.