title: Obtain Data from two parse classes based on column in one table
body: <p>I have to Parse Classes in my data browser, 'Details' and 'Content'. The 'Details' class has the following --> 'objectId', 'uuid' and 'proximity'. The 'Content' class has 'objectId', 'descId' and 'offer'.</p>
  
  <p>I have created a web UI using the Javascript SDK so when the user enters the uuid, proximity and offer, uuid and proximity get stored in the 'Details' class, on success I then get the objectId of the newly created object. I then store that objectId in the 'Content' class under descId and the offer that was inputted by the user.</p>
  
  <p>My problem is I have a html table that I need to populate, so I need to pull the data from both classes. The uuid and proximity from 'Details' and the offer from 'Content' so I need to do this in one query. This is my reason for storing the 'Details' objectId in the 'Content' class as a type of foreign key.</p>
  
  <p>I am stuck at this cross roads and have tried include etc but I am just trying things and I'm not sure what I need to do. If anyone can help, perhaps show me a sample, I'd greatly appreciate it</p>
  
  <p>Here is my js save code:</p>
  
  <pre><code> //Creating Beacon Content Parse Object
      var iBeaconContent = Parse.Object.extend("Content");
      var beaconContent = new iBeaconContent();
  
      //Creating Object to save to iBeacon Description Table
      var iBeaconDescription = Parse.Object.extend("Details");
      var beaconDescription = new iBeaconDescription();
  
      beaconDescription.set("uuid", tdUuid.children("input[type=text]").val().toString());
      beaconDescription.set("proximity", parseInt(tdProximity.children($('prox')).val().toString()));
  
      beaconDescription.save(null, {
          success: function(beaconDescriptionObject) {
              var query = new Parse.Query("Details");
              query.equalTo("uuid", tdUuid.children("input[type=text]").val().toString());
              query.find({
                  success: function(results) {
  
                      objectId = results[0].id;
  
                      beaconContent.set("descId", objectId);
                      beaconContent.set("offer", tdOffer.children("input[type=text]").val().toString());
                      beaconContent.save(null, {
                          success: function(object) {
                              document.location.reload(true);
                          }, error: function(beaconContent, error) {
                          }
                      });
                  }
              });
          },
          error: function(error) {
          }
      });
  </code></pre>
  
  <p><strong><em>NEW JAVASCRIPT</em></strong></p>
  
  <pre><code>var BeaconDetail = Parse.Object.extend("Details");
  var BeaconContent = Parse.Object.extend("Content");
  
  var innerQuery = new Parse.Query(BeaconDetail);
  innerQuery.exists("descId");
  var query = Parse.Query(BeaconDetail);
  
  query.matchesQuery("objectId", innerQuery);
      query.find({
          success:function(beaconContent){
              alert("Success----lenght:  " + beaconContent.length);
  
          }
      })
  </code></pre>