Answer the question
In order to leave comments, you need to log in
Can't access properties of Vue object. How to be?
Good evening!
I encountered such a problem in Vue.js, in general, there is a property: responseData: []
in the Vue object, it is successfully filled with data from the server, as a result, the following is obtained there:
0: {
rooms: {
0: {
"type": 1
},
1: {
"type": 2
},
2: {
"type": 3
}
}
}
this.responseData[0]
<span v-for="post in responseData[0]">{{ post.title }}</span>
Answer the question
In order to leave comments, you need to log in
You create an empty array, let posts: []
's say in the data object, and then you assign data from the server this.posts = responseData
, then output it through v-for already through the posts object
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question