PostOffice is an array. Therefore the . operator wouldn't work. What you can do is store the PostOffice array in a Vue data property and then loop over it using v-for in your template block. It would be something like this:
<template>
<div>
<!-- ... -->
<ul>
<li v-for="postOffice of postOffices">{{ postOffice.Name }} {{ postOffice.State }} {{ postOffice.Country }}</li>
</ul>
<!-- ... -->
</div>
</template>
<script>
export default {
data() {
// ...
postOffices: [],
// ...
},
created() {
axios.get('https://postalpincode.in/api/pincode/' + app.startingZip)
.then(response => this.postOffices = response.data.PostOffice)
.catch(error => console.log(error));
}
}
</script>
EDIT: If you just want to get the first value from the returned array, you can modify your original code to this:
axios.get('https://postalpincode.in/api/pincode/' + app.startingZip)
.then(function (response) {
app.startingCity = response.data.PostOffice[0].Name + ',' response.data.PostOffice[0].state + ',' + response.data.PostOffice[0].country
})
.catch(function (error) {
app.startingCity = "Invalid Zipcode"
});