How can I check if an anonymous object that was created as such:
var myObj = {
prop1: 'no',
prop2: function () { return false; }
}
does indeed have a prop2 defined?
prop2
will always be defined as a function, but for some objects it is not required and will not be defined.
I tried what was suggested here: http://stackoverflow.com/questions/595766/how-to-determine-if-native-javascript-object-has-a-property-method but I don't think it works for anonymous objects .