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: How to determine if Native JavaScript Object has a Property/Method? but I don't think it works for anonymous objects .