I am currently working on a Vue application where I want to display each 'object' in its own table row. However, I'm facing an issue where the objects are being displayed in one column or as separate rows. Is there a way to ensure that '0 BTC AUD 14,745.3' appears in the first row and the next object '1 ETH AUD 312.14' is shown in the second row? As someone new to Vue, I would appreciate any assistance. Thank you!
Below is an image link and the code snippet:
https://i.sstatic.net/ZBoHy.png
<template>
<div class="main">
<div id="container" v-for="(index) in coin" :key="index">
<table class="coins">
<thead>
<tr class="header">
<th>Rank</th>
<th>Name</th>
<th>Price</th>
</tr>
</thead>
<tbody>
<td>{{ index }}</td>
</tbody>
</table>
</div>
</div>
</template>
<script>
import axios from 'axios'
var limit = 20
export default {
name: 'ex',
data: () => ({
coin: []
}),
created () {
axios.get('https://min-api.cryptocompare.com/data/top/totalvolfull?limit=' + limit + '&tsym=AUD')
.then(response => {
for (var i = 0; i < limit; i++) {
this.coin.push(i, response.data.Data[i].CoinInfo.Name, response.data.Data[i].DISPLAY.AUD.PRICE)
// console.log(this.coin[i])
}
})
.catch(e => {
this.errors.push(e)
})
}
}
</script>