how do I remove duplicate from below JSON
checking website_name and only keeping num_followers with greatest value per date
the output should be just one value of website name in each websites array for each date
[
{
"date": "2022-02-15",
"websites": [
{
"website_name": "instagram",
"num_followers": "123146780"
},
{
"website_name": "instagram",
"num_followers": "123134954"
},
{
"website_name": "tiktok",
"num_followers": "123184229"
}
]
},
{
"date": "2022-02-14",
"websites": [
{
"website_name": "instagram",
"num_followers": "123057832"
},
{
"website_name": "tiktok",
"num_followers": "123058141"
},
{
"website_name": "tiktok",
"num_followers": "123058219"
},
{
"website_name": "instagram",
"num_followers": "123059280"
}
]
}
]