How do i manipulate this

Tell us what’s happening:
I can’t fulfill the fourth condition. can someone offer me some help?! I think i should use a regex expression rather than Array.includes. But i can write such regex expression.

Your code so far


function whatIsInAName(collection, source) {
var arr = [];
// Only change code below this line
const sourceArr = Object.entries(source).toString()
console.log(sourceArr);

const filtered = collection.filter(obj => {

//  console.log(JSON.stringify(Object.entries(obj)))
// console.log(Object.entries(obj).toString());



// console.log(obj)
// return Object.entries(obj).toString().includes('apple,1')
return (Object.entries(obj).toString().includes(sourceArr))
})
arr.push(...filtered)
// Only change code above this line
return arr;
}

// whatIsInAName([{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }], { last: "Capulet" });

console.log(whatIsInAName([{ "apple": 1, "bat": 2 }, { "apple": 1 }, { "apple": 1, "bat": 2, "cookie": 2 }], { "apple": 1, "cookie": 2 }))

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36.

Challenge: Wherefore art thou

Link to the challenge: