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