title: javascript how to find number of children in an object
body: <p>is there a way to find the number of children in a javascript object other than running a loop and using a counter? I can leverage jquery if it will help. I am doing this:</p>
  
  <pre><code>var childScenesObj = [];
  var childScenesLen = scenes[sceneID].length; //need to find number of children of scenes[sceneID]. This obviously does not work, as it an object, not an array.
  
  
  for (childIndex in scenes[sceneID].children) {
      childSceneObj = new Object();
      childSceneID = scenes[sceneID].children[childIndex];
      childSceneNode = scenes[childSceneID];
      childSceneObj.name = childSceneNode.name;
      childSceneObj.id = childSceneID;
      childScenesObj  .push(childSceneObj);
  }
  </code></pre>