How to check if an object contains another object like
const LHS = {
a : "Something a",
b : "Something b",
c : { a : "Something a"}
}
let RHS = {
a : "Something a",
c : { a : "Something a"}
}
// How to write a function contains which replicates this behaviour
contains(LHS, RHS) // should return true
RHS = {
a : "Something a",
c : { a : "Something a"},
d : "Something d"
}
contians(LHS, RHS) // Should return false
I have abosulety no Idea how to do that. If you know some external libaries that does this please share it.
Thanks