I have kind of this Array :
array = [
{
a:0,
b:{x:1,y:2}
},
{
c:0,
b:{x:3,y:2}},
]
And I have a new object like this
{
e:0,
b:{x:2,y:5}
}
I want to test whether the objects in array have the same nested b object or not, if so I'll push the new object there, if it already exists, I'll replace the whole object with the newer one.
Any help how could I achieve that please (Lodash, ES6..),
I'm using Typescript btw.
$.extendis for plain objects, not arrays