In the code snippet below, I am displaying data from an API for all flats on a single page. However, I am facing difficulty in showing the floor number for each flat. The JSON body is as follows:
{
"response": [
{
"floors": [
{
"flats": [
{
"status": "",
"price": "80000",
"currency": "USD",
"end_date": "Not Set",
...
For your information, there are 6 flats on each floor.
<b-card-body class="px-lg-5 py-lg-5" v-for="flat in flats" :key="flat._id">
<div class="text-center text-muted mb-4 border-dash">
<p class="city">{{flat.city}}</p>
<span v-for="(building,index) in buildings" :key="index">
<p class="iconB" v-if="building._id.includes(flat.building)">{{building.building_number}} building number </p>
<h3>{{building.floor_number}} floor</h3> //not working
</span>
<h2>{{flat.buyer}} <i class="fas fa-user"></i> </h2>
<h3 class="mb-5">flat no ({{flat.flat_number}})</h3>
The issue with my code above is that everything displays correctly except for the floor. Any suggestions or assistance would be greatly appreciated.