Hi! Suppose this:
var o1 = { a:1, b:2, c:3 }
var o2 = { a:1.2, b:2.2, c:3.2, d:4, e:5 }
I want some kind of merge operation that merges only the props with
same key, so in the end I've got this:
var o3 = { a:1.2, b:2.2, c:3.2 }
I know I can do it with a couple of passages, for ex. by using
Object.subset first. Though, I'd like to know i there's some other
smart way. It would quite handy if in the future releases of mootools
there will be a thing like:
Object.merge(o1,o2[,true]);
where the last option is for using only the common keys or not.
:) How about?