jQuery.isPlainObject() in JQuery


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 an object literal.


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

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

Leave a Reply

Your email address will not be published. Required fields are marked *