[Vuejs]-Not able to retrieve data from JSON object in Vue

0๐Ÿ‘

โœ…

1) response returned by the api is an object where as you have defined cryptos as an array

2) {{value.Data.LTC.FullName}} is what should be referred in the template

This should work:

export default {
  name: 'Main',
  data () {
    return {
      cryptos: []
    }
  },
  created() {
      axios.get("https://www.cryptocompare.com/api/data/coinlist/")
        .then(response => {
            this.cryptos = [response.data];
            console.log(this.cryptos);
        })
  }
}
</script>

Leave a comment