1<ul>
2 <li v-for="food in foods">
3 <h2>{{food.name}}</h2>
4 <ul>
5 <li v-for="nutrient in food.nutrients">{{nutrient.nutrient_id}}</li>
6 </ul>
7 </li>
8</ul>
9
10
11axios.get(url).then(response => {
12 this.foods = response.data.report.foods
13})
1new Vue({
2 el: '#app',
3 data () {
4 return {
5 info: null
6 }
7 },
8 mounted () {
9 axios
10 .get('https://api.coindesk.com/v1/bpi/currentprice.json')
11 .then(response => (this.info = response))
12 }
13})