right now I’m trying to figure out why this filter isn’t woking, in just trying to get an array back of the collection objects that have the property in the source parameter. it just returns an empty array.
const keys = Object.keys(source);
let newArr = collection.filter((obj) => {
keys.forEach((e) => {
if (obj.hasOwnProperty(e)) {
return true;
} else {
return false;
}
});
});