I have the following JSON , how do i get difference between the previous date for num_followers for each website ?
like for website yqq on 15-02-2022 I need to get the difference between the num_followers from 14-02-2022 and update num_followers with difference value
[
{
"date": "2022-02-15",
"websites": [
{
"website_name": "yqq",
"num_followers": "454421"
},
{
"website_name": "soundcloud",
"num_followers": "757127"
},
{
"website_name": "twitter",
"num_followers": "21779161"
},
{
"website_name": "soundcloud",
"num_followers": "757054"
},
{
"website_name": "triller",
"num_followers": "5196"
},
]
},
{
"date": "2022-02-14",
"websites": [
{
"website_name": "yqq",
"num_followers": "123058219"
},
{
"website_name": "triller",
"num_followers": "5195"
},
{
"website_name": "tiktok",
"num_followers": "17100000"
},
{
"website_name": "instagram",
"num_followers": "123059626"
},
{
"website_name": "tiktok",
"num_followers": "17100000"
},
{
"website_name": "tiktok",
"num_followers": "17100000"
},
{
"website_name": "soundcloud",
"num_followers": "756956"
},
]
}
]