title: Is there a way fetch javascript data with axios or do the data need to be only in json format to do so?
body: <p>I would like to know if I can fetch javascript data with axios or is the only way is to them and using the map method to do so?</p>
  <pre><code>const [englishData, setEnglishData] = useState([]);
  useEffect(() =&gt; {
    const fetchData = async () =&gt; {
      const ENGLISHDICO = await axios.get('./src/shared/english-phobia.js');
      setEnglishData(ENGLISHDICO);
      console.log(ENGLISHDICO);
    };
    fetchData();
  }, []);
  </code></pre>
  <p>The javascript data look like this:</p>
  <pre><code>export const ENGLISHDICO = {
  x: [
      {
        id: 303,
        rating: 5,
        phobiaName: 'xanthophobia',
        description: 'fear of the color yellow',
      },
      {
        id: 304,
        rating: 5,
        phobiaName: 'xenophobia',
        description: 'fear of strangers',
      },
      {
        id: 305,
        rating: 5,
        phobiaName: 'xerophobia',
        description: 'fear of dryness',
      },
      {
        id: 306,
        rating: 5,
        phobiaName: 'xylophobia',
        description: 'fear of forests',
      },
    ],
  }
  </code></pre>