How do I get number of fields in JavaScript object?
<p>I'm trying to use JavaScript object as an associative array and everything was well until I needed to get number of entries that are stored in it. What is the easiest and most elegant way to do that? All I can think of is to run <code>for each</code> loop or jQuery <code>$.each</code> function and just see how much iterations it would do but that looks like an an awful thing to do.</p>
