I would like all the name and after this if parent is not null it should return parent.name
so data should be
Zack
Computer - mouse
Computer HDD
Laptop - Ram
How can i achieve this here is my code
<li v-for="(index, item) in inventory">
{{ item.name }}
</li>
<li v-for="par in item.parent"> {{ par.name }} </li>
</ul>
https://jsfiddle.net/L3gshbna/
This should return those parents is null and then whose parents are there see my expected response thanks