title: Return multiple values from jquery ajax call to php
body: <p>I am trying to return multiple values from a php process.  </p>
  
  <p>Here is the jQuery function</p>
  
  <pre><code>$.ajax({
      url: 'shopping_cart_add.php',
      data: 'item_id='+subscription_id+'&amp;item_name='+subscription_name+'&amp;item_price='+subscription_price,
      type: 'POST',
      dataType: 'json',
      success: function(response, statusText) {
                  var qty = response.item_quantity;
                  $("#shopping-cart-quantity").html(qty);
      }
  });
  </code></pre>
  
  <p>The above seems to work except I can't retrieve the specific field values from the returned JSON. </p>
  
  <p>When I try this...</p>
  
  <pre><code>var qty = response.item_quantity;
  $("#shopping-cart-quantity").html(qty);
  </code></pre>
  
  <p>Nothing happens.</p>
  
  <p>If I change...</p>
  
  <pre><code>$("#shopping-cart-quantity").html(qty);
  </code></pre>
  
  <p>to</p>
  
  <pre><code>$("#shopping-cart-quantity").html(response);
  </code></pre>
  
  <p>I get the following...</p>
  
  <pre><code>{ 'account_id': '1', 'item_id' : 'cce3d2a017f6f1870ce8480a32506bed', 'item_name' : 'CE', 'item_quantity' : '1', 'item_price' : '1' }
  </code></pre>