1

I'm trying to get back the "url" value so I can use it to show an image with Picasso in Android Studio... What's the best way to parse this json in kotlin to only get back each "url" value? I tried multimedia.filter but haven't had any success with it.

"multimedia": [
                {
                    "url": "https://static01.nyt.com/images/2020/06/23/world/23virus-europe-travel/23virus-europe-travel-superJumbo.jpg",
                    "format": "superJumbo",
                    "height": 1365,
                    "width": 2048,
                    "type": "image",
                    "subtype": "photo",
                    "caption": "Arrivals at the Adolfo Suarez-Barajas airport in Madrid, Spain, on Sunday. European officials are devising a list of ‘safe’ countries to accept visitors from this summer.",
                    "copyright": "Bernat Armangue/Associated Press"
                },
                {
                    "url": "https://static01.nyt.com/images/2020/06/23/world/23virus-europe-travel/23virus-europe-travel-thumbStandard.jpg",
                    "format": "Standard Thumbnail",
                    "height": 75,
                    "width": 75,
                    "type": "image",
                    "subtype": "photo",
                    "caption": "Arrivals at the Adolfo Suarez-Barajas airport in Madrid, Spain, on Sunday. European officials are devising a list of ‘safe’ countries to accept visitors from this summer.",
                    "copyright": "Bernat Armangue/Associated Press"
                },
                {
                    "url": "https://static01.nyt.com/images/2020/06/23/world/23virus-europe-travel/23virus-europe-travel-thumbLarge.jpg",
                    "format": "thumbLarge",
                    "height": 150,
                    "width": 150,
                    "type": "image",
                    "subtype": "photo",
                    "caption": "Arrivals at the Adolfo Suarez-Barajas airport in Madrid, Spain, on Sunday. European officials are devising a list of ‘safe’ countries to accept visitors from this summer.",
                    "copyright": "Bernat Armangue/Associated Press"
                },
                {
                    "url": "https://static01.nyt.com/images/2020/06/23/world/23virus-europe-travel/23virus-europe-travel-mediumThreeByTwo210.jpg",
                    "format": "mediumThreeByTwo210",
                    "height": 140,
                    "width": 210,
                    "type": "image",
                    "subtype": "photo",
                    "caption": "Arrivals at the Adolfo Suarez-Barajas airport in Madrid, Spain, on Sunday. European officials are devising a list of ‘safe’ countries to accept visitors from this summer.",
                    "copyright": "Bernat Armangue/Associated Press"
                },
                {
                    "url": "https://static01.nyt.com/images/2020/06/23/world/23virus-europe-travel/23virus-europe-travel-articleInline.jpg",
                    "format": "Normal",
                    "height": 127,
                    "width": 190,
                    "type": "image",
                    "subtype": "photo",
                    "caption": "Arrivals at the Adolfo Suarez-Barajas airport in Madrid, Spain, on Sunday. European officials are devising a list of ‘safe’ countries to accept visitors from this summer.",
                    "copyright": "Bernat Armangue/Associated Press"
                }
            ]
Cosovic
  • 79
  • 6

0 Answers0