title: comparing javascript objects using jquery
body: <p>I have a master product list that has a logical object structure:</p>
  
  <pre><code>var myProducts = {
       "productInfo":{
          "productVariations":[{
              "ID":XXXXXXX,
              "Attributes":{
                  "edition":'professional',
                  "license":"perpetual"
              }
          },
          {
              "ID":XXXXXX,
              "Attributes":{
                  "edition":'standard',
                  "license":"perpetual"
              }
          },
          .
          .
          .
  </code></pre>
  
  <p>I am trying to compare this to a dynamically generated object array created by a product configurator application I have built. This list looks like this once generated:</p>
  
  <pre><code>var zcs_edition = [{ edition="standard", license="perpetual"}, { edition="professional", license="perpetual" }]
  </code></pre>
  
  <p>using $.inArray to compare the elements like below doesnt seem to be effective:</p>
  
  <pre><code>$.each(myProducts.productInfo.productVariations,function(i, val){
  //console.log(this.productID);
      //console.log(val.productAttributes  );
      //console.log($.inArray(val.productAttributes, zcs_edition ))
  });
  </code></pre>
  
  <p>Am I doing something wrong here, I half expected this to work.</p>