I got a nested json file but I only want to have values for latitude, longitude, name and image. How can I change the format of this json file?
{"217417223": {
"count": 1,
"media_items": [
{
"image": "https://scontent.cdninstagram.com/vp/1c0099702809eb88225d205b2d4d9471/5DEA1FF2/t51.2885-15/sh0.08/e35/s640x640/49616199_376550376454921_2728948063380747681_n.jpg?_nc_ht=scontent.cdninstagram.com",
"link": "https://www.instagram.com/p/BsAbzbNg5nJ/",
"id": "1945677320190925257_1651881702"
}
],
"name": "Darlington railway station",
"longitude": -1.5464,
"additional_data": {
"display_name": "Darlington, Park Lane, Bank Top, Darlington, North East England, England, DL1 5AE, United Kingdom",
"place_id": "96959117",
"lon": "-1.54675897913165",
"boundingbox": [
"54.5194926",
"54.5223858",
"-1.54771",
"-1.5457426"
],
"osm_type": "way",
"osm_id": "68142725",
"lat": "54.52105765",
"address": {
"town": "Darlington",
"state_district": "North East England",
"country": "United Kingdom",
"county": "Darlington",
"suburb": "Bank Top",
"state": "England",
"station": "Darlington",
"postcode": "DL1 5AE",
"country_code": "gb",
"road": "Park Lane"
}
},
"latitude": 54.5209,
"id": 217417223
},
"394139011067403": {
"count": 1,
"media_items": [
{
"image": "https://scontent.cdninstagram.com/vp/3aac40c28cce8397d9fe565516de7502/5DE52C0B/t51.2885-15/sh0.08/e35/s640x640/46000756_291778651452164_4420788779216580668_n.jpg?_nc_ht=scontent.cdninstagram.com",
"link": "https://www.instagram.com/p/BqYtsmxAECB/",
"id": "1916482618820411521_1651881702"
}
],
"name": "George Street",
"longitude": -3.26729,
"additional_data": {
"display_name": "5, Corstorphine Road, Corstorphine, Edinburgh, City of Edinburgh, Scotland, EH12 7AU, United Kingdom",
"place_id": "50446446",
"lon": "-3.2672375",
"boundingbox": [
"55.941973",
"55.942173",
"-3.2673375",
"-3.2671375"
],
"osm_type": "node",
"osm_id": "3944885057",
"lat": "55.942073",
"address": {
"city": "Edinburgh",
"house_number": "5",
"country": "United Kingdom",
"county": "City of Edinburgh",
"suburb": "Corstorphine",
"state": "Scotland",
"postcode": "EH12 7AU",
"country_code": "gb",
"road": "Corstorphine Road"
}
},
"latitude": 55.94208,
"id": 394139011067403
}
}
And the file I want looks like this:
[{
"latitude": 54.5971,
"name": "Belfast",
"longitude": -5.9301,
"id": 320007257,
"img": "https://scontent.cdninstagram.com/vp/092066e2c0515b777420df6c5bda1b72/5DBCD171/t51.2885-15/e35/s320x320/47691939_1489011361230590_3361168451502130561_n.jpg?_nc_ht=scontent.cdninstagram.com",
"link": "https://www.instagram.com/p/BrnHd_mgR9C/"
},{
"latitude": 51.500955739612,
"name": "Buckingham Palace",
"longitude": -0.14312267303467,
"id": 504822481,
"img": "https://scontent.cdninstagram.com/vp/8982e1151375e7a1b273d894553de79e/5DC8A916/t51.2885-15/e35/s320x320/47586099_1814306185347470_7469652388588990014_n.jpg?_nc_ht=scontent.cdninstagram.com",
"link": "https://www.instagram.com/p/Br0_bB6g2wq/"
}]