Trying to navigate through the complexities of Vue-Resource has brought me to a standstill while working with the api. I am attempting to organize a collection of threads using v-for: thread in threads
.
Below is an excerpt of the data structure I am dealing with:
[{
"threads": [{
"no": 1,
"name": "John",
"com": "comment"
},{
"no": 2,
"name": "Jim",
"com": "comment"
},{
"no": 3,
"name": "Jane",
"com": "comment"
}],
"page": 0
}, {
"threads": [{
"no": 4,
"name": "Tom",
"com": "comment"
},{
"no": 5,
"name": "Mark",
"com": "comment"
}],
"page": 1
}]
The api contains threads spread out over multiple pages, and what I aim for is a list that displays something along the lines of
{{ thread.name }}{{ thread.com }}
for each no
. However, I am unsure about how to extract this information utilizing vue-resource. Currently, if I employ
<li v-for="thread in threads"> {{ thread.name }}{{ thread.com }} </li>
I end up with a series of empty elements.