jQuery.isPlainObject()

jQuery.isPlainObject( object ) Returns: Boolean

Description: Check to see if an object is a plain object (created using "{}" or "new Object").

  • version added: 1.4jQuery.isPlainObject( object )

    objectThe object that will be checked to see if it's a plain object.

Example:

Check an object to see if it's a plain object.

jQuery.isPlainObject({}) // true
jQuery.isPlainObject("test") // false