0
The JSON response you posted has 8 array elements without field_77_raw
, so your template needs to conditionally render that field with v-if
.
Also, I don’t see the records
key in the data. If the API response is just an array, you’re assigning the response directly to this.mountains
, so the v-for
should iterate mountains
(not mountains.records
).
<div v-for="mountain of mountains">
{{mountain.id}}
<template v-if="mountain.field_77_raw">
{{mountain.field_77_raw.url}}
</template>
</div>
Source:stackexchange.com