I am currently stuck with a small problem.So, i have a JSON file. And i want to display only the data with London as city. How do i approach it. With my code, which is below , it will display all the data, which i don't want. I tried to do it with if statement, comparing the value, but it was not working
[
{
"id": 0,
"city": "Budapest",
"noDays": 3,
},
{
"id": 1,
"city": "London",
"noDays": 5,
},
{
"id": 2,
"city": "London",
"noDays": 2,
},
{
"id": 3,
"city": "Paris",
"noDays": 3,
},
]
function :
function City({ props }) {
return (
<div>
{props.map((place) => (
<p>{place.city}</p>
))}
</div>
);
}