How to access values inside a multiple array JSON object?

How can I access array data inside my json object data?

    const [data, setData] = useState([])

    const getData = () => {
      axiosInstance
        .get(url + slug)
        .then(result => setData(result.data))
    }
    useEffect(() => {
      getData()
    }, [])        

Here are something I’ve tried:

  console.log(data['symbol'])
  console.log(data[0]['symbol'])
  console.log(data[0].symbol)

Here is the data being used in my state:
enter image description here

To keep it simple, lets say I want to the access first array, and console log all values for symbol. How would I go about doing that?

14 thoughts on “How to access values inside a multiple array JSON object?”

Leave a Comment