N
Nuxt2y ago
isakwang

V-for on proxy with array in it

Hello Im struggeling with running v-for over an api request, but the response is structured as an array. Is there a good way to flatten the response/array so it is more easily iterated over? Screenshot of the api response attached
No description
11 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
isakwang
isakwangOP2y ago
i want to create a table based on the response, but right now the v-for only goes over the array object, not the fields inside the array. To get info from a field it currently looks like this "console.log(this.grosses.item_grosses[0].order_id);"
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
isakwang
isakwangOP2y ago
sorry for the late response. I want to output it to this
No description
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
isakwang
isakwangOP2y ago
i tried that but it errors "Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'gross.event_name')"
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
isakwang
isakwangOP2y ago
brackets fixed it. thanks
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
isakwang
isakwangOP2y ago
there´s already a unique id in the response so i'll use that. Thank you
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server