need to show Movies in the select tag in which options are 2018,2019,2020 etc and when a year gets selected need to show corresponding Movies
const data = {
2018: ["Avengers 1", "Now you see me", "Fast and Furious 7"],
2019: ["Avengers 2", "Now you see me 2", "Fast and Furious 8"],
2020: [
"Final Avengers Movie(Iron man dies)",
"Now you finally used Lenskart",
"Covid Came",
],
2021: ["Covid Returns"],
2022: ["Adventures of Saiman", "Adventures of Shaktiman"],
};
const App = () => {
const [option, setOption] = useState([]);
return (
<div id="main">
<select name="select">
{Object.keys(data).map((year) => (
<option value={year}>{year}</option>
))}
</select>
</div>
);
}