title: Get sub webs from current web in SharePoint with JavaScript
body: <p>I'm writing out every sub web in a custom navigation:</p>
  
  <pre><code>navigation = function (clientContext, web) {
      this.webCollection = web.getSubwebsForCurrentUser(null);
  
      clientContext.load(web);
      clientContext.load(this.webCollection, 'Include(Title, Url)');
      clientContext.executeQueryAsync(Function.createDelegate(navigationSuccess), Function.createDelegate(navigationFailed));
  },
  
  navigationSuccess = function () {
    var webEnumerator = this.webCollection.getEnumerator();
      while (webEnumerator.moveNext()) {
          var web = webEnumerator.get_current();
          // Writing out title/url for sub web.
      }
  },
  </code></pre>
  
  <p>In navigationSuccess I want to check if this sub web contains any sub webs. Is this possible? I've tried web.get_webs() after get_current() but this I need to load first right (In a new function similar to "navigation")? </p>
  
  <p>Feels like a big process for just check/count if current sub webs is containing any sub webs?</p>