i am getting the json from api but it is not converting to array previously i got the values but from this code i am not getting the value
this is my code:
componentWillMount() {
let initialFilename;
fetch('http://localhost/Generator/FetchfileDetails.php')
.then(response=>{
return response.json();
}).then(data=>{
alert(data.filename);
});
}
the key value in my json is filename is to be stored in array how to do???