title: Check if json object is undefined
body: <p>I am using the amazon product api, my requests return xml in which encode to json.</p>
  
  <p>Some items in my feed to not have a price, therefore I get the following error</p>
  
  <pre><code>TypeError: this.ItemAttributes.ListPrice is undefined
  </code></pre>
  
  <p>However I can retrieve a sale price. So I want to basically see if </p>
  
  <p>this.ItemAttributes.ListPrice is undefined  if so then look for this...</p>
  
  <p>this.Offers.OfferListing.Price.FormattedPrice</p>
  
  <p>How can I do this in jQuery?</p>
  
  <p>I tried this..</p>
  
  <pre><code>if (this.ItemAttributes.ListPrice != null){
  var price = this.ItemAttributes.ListPrice;
  }else{
  var price = this.Offers.OfferListing.Price.FormattedPrice
  }
  </code></pre>