Get size of a JavaScript object