I have two arrays: First - jobs array of objects that contains array itemIds, like this:
jobs: [{
name: null
id: 612
items: []
stat: 1
itemIds: [223, 1234]
},
{
name: null
id: 734
items: []
stat: 2
itemIds: [564]
}
.
.
.
]
and second array - items, like this:
items: [{
act: true
id: 1234
name: "Item1"
},
{
act: true
id: 222
name: "Item2"
},
]
How to filter out an array of items whos id isn't equal to any of itemIds from jobs array or that property stat from jobs array isn't equal to 0 ? I tried with three loops, but it dropped out only one item with the same id in a array of jobs. Any help appreciated.