Imagine having two arrays with a similar structure like this:
const individuals = [{name: "Jane Doe", id: "0001"},{name: "John Doe", id:"0002"}, {name: "Sam Smith", id: "0003"}, {name: "Joe Bloggs", id:"0004"}];
const additionalData = [{id: "0001", data: "some data"},{id:"0002", data: "some more data"}, {id: "0003", data: "some further data" }, {id:"0004", data: "even more data"}];
You have a loop structured like this:
<componentName v-for="i in individuals" :person="i" :others="" />
The goal is to pass the data attribute from the additionalData array for the corresponding id without using computed values that take parameters. Can you achieve this by running an additionalData.filter
within each loop iteration?