I'm trying to figure out how to read a local JSON file using Axios. The data.json file is located in public/info/data.json. However, every time I attempt to make a get request, I receive a 404 error message.
Here is the content of data.json:
[
{"id": 1239,"name": "Card 1"},
{"id": 1235,"name": "Card 2"},
{"id": 1233,"name": "Card 3"},
{"id": 1233,"name": "Card 4"},
]
My current get method code looks like this:
created() {
axios.get("../../public/data/data.json")
.then((response) => {
response.data
})