Is there a way to retrieve the unique post id data from a JSON file in NuxtJS?
created() {
this.fetchProductData()
},
methods: {
fetchProductData() {
const vueInstance = this
this.$axios
.get(`/json/products.json`)
.then(function(response) {
vueInstance.item = response.data.products
})
.catch((error) => console.log(error))
}
}