I have a few objects:
var a = { "abc": {}, "def": {}, "ghi": {} };
var b = { "abc": {}, "ghi": {}, "jkl": {}, "mno": {} };
var c = { "abc": {}, "ghi": {}, "xyz": {}, "mno": {} };
And I wonder how to get the property names that exist in all of them:
var d = getOmniPresentProperties(a, b, c);
function getOmniPresentProperties() {
// black magic?
}
so d
should be ["abc", "ghi"]
The number of arguments/ objects to compare may vary so I am unsure how to approach. Any ideas?