C
C
chincharovpc2019-04-15 22:50:03
Vue.js
chincharovpc, 2019-04-15 22:50:03

Vue js object output?

Got two_data object from API

axios.get('/TableHome/connection/two', {params: {first_human: this.person1, second_human: this.person2}}).then(response => {
                this.two_data =response.data;
            });

I want to display its elements in template, without v-for="item in two_data"
<h6 class="card-subtitle mb-2 text-muted">{{two_data........}} года рождения</h6>

If you write like this
<h6 class="card-subtitle mb-2 text-muted">{{two_data['mother_data'][0]['data_birth']}} года рождения</h6>

it works but with errors
Error in render: "TypeError: _vm.two_data.father_data is undefined"

The object looks like this
5cb4e06205b7b968183193.pngHelp with displaying the elements of this object in the template

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
chincharovpc, 2019-04-15
@chincharovpc

Who cares...
Made with v-for
<h5 class="card-title">{{item['last_name']}}</h5>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question