In React native - I don't know how to get json data value that's key name contains a hyphen(-) like media-metadata
this is the API json response
"approved_for_syndication": 1,
"media-metadata": [
{
"url": "https://static01.nyt.com/images/2019/05/13/business/00deutschetrump2/merlin_154640208_f27c634b-ab02-42af-8c94-10d4b01d8ddf-square320.jpg",
"format": "square320",
"height": 320,
"width": 320
},
{
"url": "https://static01.nyt.com/images/2019/05/13/business/00deutschetrump2/merlin_154640208_f27c634b-ab02-42af-8c94-10d4b01d8ddf-thumbStandard.jpg",
"format": "Standard Thumbnail",
"height": 75,
"width": 75
},
and this is the code I have tried
<Image source = {
{
uri: item.media-metadata[0].url,
isStatic: true
}
}
style = {
{
width: 100,
height: 100
}
}
/>