$.inObject
$.inObject
I think it would be convenient to have a method for testing whether or not a value exists in an object (of course you can use the long-hand version of this, but this seems more intuitive, especially when an inArray function exists):
- $.inObject = function(object, value) {
- return (typeof object[value] === 'undefined' ? false : true);
- };