I have a .json file with the following structure:
{
"title": "A"
"name": "B"
},
{
"title": "C"
"name": "D"
},
and I want to use this data inside my Vue.js app. When I copy the data by hand to my my app, everything works:
<script>
new Vue({
el: '#app',
data: {
items: [
{
"title": "A"
"name": "B"
},
{
"title": "C"
"name": "D"
},
]
How can I load the data directly to my Vue app without having to copy the content of the .json file by hand?
(I'm using the CDN to load Vue.js and hence the usual "import" solutions do not work.)