load json in nuxt code example
Example: how to load existing json data in nuxt
<script>
import authors from '~/static/data.json'
export default {
asyncData ({ params }) {
return { authors }
}
}
</script>
<script>
import authors from '~/static/data.json'
export default {
asyncData ({ params }) {
return { authors }
}
}
</script>