This is api of movie which contain movie as key and movies detail as object Now I have get the values of movie in useState but I not able to figure out how exactly I can get the details
{
"movies": [
{
"Name":"The Forever Purge",
"releasedate":"27 aug 2012",
"id": 1,
"genre" :"Action/Horror/Thriller",
"imageUrl": "https://drive.google.com/file/d/1sisX7wQf6owcj3qys413l471bNu5iM0T/view?
usp=sharing"
},
{
"Name":"Reminiscence",
"releasedate":"27 aug 2012",
"id": 2,
"genre" :"Mystery/Romantic/Sci-Fi",
"imageUrl": "https://drive.google.com/file/d/1GBzbZ6VC243-1kg4EsaYwq6Qm9fLDdJb/view?
usp=sharing"
}
]
}
this is currently I am writing in code But this is not getting we the details of movie
const [moviesList, setMoviesList] = useState({});
const getMovies = async () => {
const response = await fetch(
"https://run.mocky.io/v3/55492543-1c03-4b5e-8ff4-28bbd2638780"
);
var data= await response.json();
setMoviesList(data);
// console.log("hiii");
};
useEffect =(() => {
getMovies();
},
[]);
so can any one please help me