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
11 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
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•2y ago
Message Not Public
Sign In & Join Server To View
sorry for the late response. I want to output it to this
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
i tried that but it errors "Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'gross.event_name')"
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
brackets fixed it. thanks
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
there´s already a unique id in the response so i'll use that. Thank you
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View