title: Check if json array is empty
body: <p>I have a little script which grabs some JSON content for a webshop menu. Sometimes a category doesn't have products in it so when the array is empty a "no products found" line must be showed. 
  I tried this with jQuery.isEmptyObject() but now the text is only showed at categories WITH products in it. The menu itself works perfectly except for the thing above...</p>
  
  <p><strong>So my question: How can I check if <code>json.products</code> or <code>product</code> is empty? If so how would you incorporate that and the end of the script?</strong></p>
  
  <p>Probably an easy one for you.... I don't see it anymore ;)</p>
  
  <p>What I have:</p>
  
  <pre><code>function widget(catId, catHref){   
    var url = catHref + 'page1.ajax?limit=4';
    $.getJSON(url, function (json){     
      var productsHtml = [];
  
        $.each(json.products, function(index, product){
  
          var productHtml = '' +
            ..... blablabla .....
  
          productsHtml.push(productHtml);
        });
        productsHtml = productsHtml.join('');
  
  
      if (jQuery.isEmptyObject(json[productsHtml])) {
        $('#widget-products'+catId+' ul').html('No products');
      } else{
        $('#widget-products'+catId+' ul').html(productsHtml);
      }
  
    });
  }
  </code></pre>