skip to Main Content

How to treat JSON data in React?

I am using the following code using a flight data API: useEffect(() => { fetch(url, options) .then((res) => res.json()) .then((json) => { console.log(json); datos.push(json) }) .catch((err) => console.log('error' + err)); }, []); return ( <div className='ejemplo'> {JSON.stringify(datos)} <div> ) and…

VIEW QUESTION
Back To Top
Search