title: Check if Specific Key Exists in Json Array
body: <p>I an trying to produce a check to determine if a specific key exists in a json array using jQuery. Specifically, if I see this key, I know that that no objects that I want to display on the page were returned from the server.</p>
  
  <p>The simple check that I'm trying to use looks like this:</p>
  
  <pre><code> if (data.hasOwnProperty('Error - No records found in table')) {
    alert('true');
   }
  </code></pre>
  
  <p>The array that is returned from the server looks like this:</p>
  
  <pre><code>[{"Error - No records found in table": ""}]
  </code></pre>
  
  <p><strong>Full Code:</strong></p>
  
  <pre><code>var url = 'https://blahblah.com';
  var postData = $('#BranchSpecials').serialize();
  var spinnerBig = $('.loadingSpinner');
  
  var getClearanceItems = $.ajax({
   type: 'Post',
   url: url,
   xhrFields: {
    withCredentials: true
   },
   crossDomain: true,
   data: postData,
   dataType: 'json',
   beforeSend: function(xhr) {
    spinnerBig.show();
   }
  });
  
  getClearanceItems.done(function(data, jqXHR) {
   var clearance = $("#clearance");
   spinnerBig.hide();
   clearance.empty();
  
   if (data.hasOwnProperty('Error - No records found in table')) {
    alert('true');
   }
  
   var items = [];
   $.each(data, function(i, item) {
    items.push('&lt;div class="item-block"&gt;&lt;a href="' + url + item.ProdLink + '"&gt;&lt;img src="https://blahblah.com/Data/' + item.ProdImage + '" width="104" height="104"/&gt;&lt;/a&gt;&lt;div class="item-meta"&gt;&lt;p class="desc"&gt;&lt;a href="' + url + item.ProdLink + '"&gt;' + item.ProductDesc + '&lt;/a&gt;&lt;/p&gt;&lt;p class="itemID"&gt;Item #: &lt;a href="' + url + item.ProdLink + '" class="uline"&gt;' + item.ProductID + '&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;');
   });
  
   clearance.append(items.join(''));
  
   clearance.slick({
    infinite: true,
    slidesToShow: 4,
    slidesToScroll: 4,
    dots: true,
    appendArrows: $('#controls'),
    prevArrow: '&lt;button type="button" class="btn btn-default"&gt;&lt;i class="material-icons"&gt;chevron_left&lt;/i&gt;&lt;/button&gt;',
    nextArrow: '&lt;button type="button" class="btn btn-default"&gt;&lt;i class="material-icons"&gt;chevron_right&lt;/i&gt;&lt;/button&gt;'
   });
  });
  </code></pre>
  
  <p><strong>Question:</strong>
  What is wrong with this check?</p>