I've got the following json response from spotify api:
{
"artists" : {
"href" : "https://api.spotify.com/v1/search?query=U2&type=artist&offset=0&limit=20",
"items" : [ {
"external_urls" : {
"spotify" : "https://open.spotify.com/artist/51Blml2LZPmy7TTiAg47vQ"
},
"followers" : {
"href" : null,
"total" : 3146466
},
"genres" : [ "irish rock", "permanent wave", "rock" ],
"href" : "https://api.spotify.com/v1/artists/51Blml2LZPmy7TTiAg47vQ",
"id" : "51Blml2LZPmy7TTiAg47vQ",
"images" : [ {
"height" : 640,
"url" : "https://i.scdn.co/image/e22d5c0c8139b8439440a69854ed66efae91112d",
"width" : 640
}, {
"height" : 160,
"url" : "https://i.scdn.co/image/7293d6752ae8a64e34adee5086858e408185b534",
"width" : 160
} ],
"name" : "U2",
"popularity" : 76,
"type" : "artist",
"uri" : "
I would like to get the id value, which in this case is
51Blml2LZPmy7TTiAg47vQ
but I can't figure out how to make a query in this json using dart.
I tried out as this answer but did not work.
Is there any way to make a query on json with flutter?