How to get multiple objects from an array of objects, VUE.JS?

Viewed 38

How to extract multiple objects from an array of objects, in this case dollars and euros, if I get data from an API in mounted using axios? I need to display the current exchange rate of USD and EUR

<script>
import axios from 'axios';

export default {
  name: 'Header',
  components: {

  },
  data() {
    return {
      currency: null,
      newCurrency: null,
    };
  },
  mounted() {
    axios
      .get('https://bank.gov.ua/NBUStatService/v1/statdirectory/exchange?json')
      .then(response => (this.currency = response.data))
      .catch((error) => console.log(error.message));
  },
}
</script>

data received from API

1 Answers
Related