Pronjaboy
2 years ago
571
2
Vue

V-for Inside V-for

Posted 2 years ago by Pronjaboy

Hello,

I want to v-for list a nested object that is inside an already v-for listed object:

I have a:

<ul v-for="(item, index) in order.type"> <li >{{item.name}</i> </ul>

And inside order.type I have another object, and I want to list the contents of this object for each order.type, just after the {{item.name}}.

I tried this: <ul v-for="(item, index) in order.type"> <li >{{item.name}</i> <li v-for="option in item.options">{{option.name}}</li> </ul>

But it didn't work =(

Please sign in or create an account to participate in this conversation.