I want to loop over a json object and create for each element a component which props are also from that object
Inside the div a inserted
<div class="row" v-for="item in projectsJson">
I use a div to get the bootstrap class.
This does create two divs instead of one. Desired result would would be one div container filled with components.
I used the same logic from react is this working different in vue?
jsonObj =
[
{
"name": "proj1",
"descr": "stuff",
"stack": ["which", "other lib"],
"imgPath": "."
},
{
"name": "proj2",
"descr": "stuffsss",
"stack": ["which ", "other "],
"imgPath": "."
}
]
<template>
<div class="row" v-for="item in projectsJson">
<project-comp
:project_name="item.name" />
</div>
</template>