wankdanker / node-object-mapper

Copy properties from one object to another.
MIT License
277 stars 73 forks source link

Question: keys with the same name #91

Open Ali-sharafi-git opened 3 years ago

Ali-sharafi-git commented 3 years ago

Hi Is there a way to avoid writing big map objects by excluding keys with same name in source and dest? eg

const  source ={
foo: 1,
bar:2,
baz:3
}

const dest = {
foo : null,
bar: null,
x: null,
y: null
}

My expectation is an empty map object would return a dest object with keys foo and bar

Thanks

jonnymony commented 2 years ago

I wanted to ask the same question! Have you found solution? @Ali-sharafi-git? Maybe someone will advise similar library?