I have a JSON file that contains information like this:
{
"title": "A"
"name": "B"
},
{
"title": "C"
"name": "D"
},
Now, I need to integrate this data into my Vue.js application. Manually copying the content works fine:
<script>
new Vue({
el: '#app',
data: {
items: [
{
"title": "A"
"name": "B"
},
{
"title": "C"
"name": "D"
},
]
Is there a way to load this JSON data directly into my Vue app without having to copy it by hand?
(Please note that I am using the CDN for Vue.js and traditional "import" methods won't work in this case.)