Hello, I am currently attempting to display data from a JSON file using Vue.js. Below is my Vue file:
<template>
<div>
<div class="card">
<div class="card-header">
<h4 class="card-title">Customer Infos</h4>
</div>
<div class="card-content">
{{site}}
</div>
</div>
</div>
</template>
<script>
export default {
props: ['site'],
mounted () {
console.dir(this.site)
}
}
</script>
<style>
</style>
Here is the resulting data:
{"id":274292982,"site_id":"2512016716"}}
I am aiming to only display the site_id
from the data.
I have already attempted the following:
{{site.site_id}}
However, this has not been successful. Thank you for your help.