// Check all elements
for (var i = 0; i < heystack.length; i++) {
// Is the element found?
- if (heystack[i] == needle) {
+ if (heystack[i] === needle) {
// Found it and abort
isInArray = true;
break;
// Return it
return decoded;
}
+
+// "Getter" for total elements in given object
+function getTotalCountFromObject (object) {
+ // Default is zero
+ var total = 0;
+
+ // Start looping
+ $.each(object, function (i, j) {
+ // Add it
+ total++;
+ });
+
+ // Return total
+ return total;
+}