This was tricky but a friend finally figured it out, I needed to know if the object passed into a function had anything in it.
This was the solution:
var x = {t1:1,t2:2,t3:3};
console.log(Object.keys(x).length);
This outputs '3'.
Thanks buddy!
This was tricky but a friend finally figured it out, I needed to know if the object passed into a function had anything in it.
This was the solution:
var x = {t1:1,t2:2,t3:3};
console.log(Object.keys(x).length);