jquery object key length code example Example: get keys length jquery var a= {"a":"a", "b":"b"}; Object.keys(a).length; //output length: 2