handleman
9/30/2014 - 7:50 PM

Get Length of Javascript Object

Get Length of Javascript Object

getObjectLength = function (obj) {
	var size = 0, key;
	for (key in obj) {
		if (obj.hasOwnProperty(key)) size++;
	}
	return size;
}