I'm trying to figure out how many properties are in the following object. Obviously, I can see 2, but I need to know dynamically.
var test = $.parseJSON('{ "ddSize": "Size", "ddColor": "Color" }');
If I try:
var mylen = test.length;
.length is undefined. The number of properties in this object will change. Sometimes it's 1, sometimes 2 or 3, but I just can't figure out how to test it.