title: sharepoint rest lookup value
body: <p>i'm having a minor issue. I'm using REST/JS to populate a dropdown box, which requires first getting the lookup of a column in a list.</p>
  
  <pre><code>//Product Model Cascade
  document.getElementById("productDD").onchange = function() {
      var prod = this.options[document.getElementById("productDD").selectedIndex].text;
      var select = document.getElementById("productModelDD");
      $(select).empty();
  
  
      var call2 = $.ajax({
          url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/Lists(guid'bb392616-24ee-47e2-9365-f17400348373')/Items", //the list
          type: "GET",
          dataType: "json",
          headers: {
              Accept: "application/json;odata=verbose"
          }
  
      });
      call2.done(function(data, textStatus, jqXHR) {
          var select = document.getElementById("productModellDD");
          for (index in data.d.results) {
              var parent = data.d.results[index].AT_ARMATECproducts; //Lookup column 
              console.log("parent var: " + parent);
              if (parent == prod) {
                  var op = document.createElement("option");
                  op.text = data.d.results[index].Title;
                  op.value = data.d.results[index].Title;
                  select.appendChild(op);
              }
  
          }
      });
  }
  </code></pre>
  
  <p>but the parent value is coming back as "undefined" and i've triple checked that this is the correct list. I've also tried .get_LookupValue() but it comes back as can't get it from an undefined field.
  So how do you get the value of a lookup field via rest?</p>
  
  <p>EDIT:</p>
  
  <p>I have done select/expand in the REST Query but have come up with a 400 bad request error:</p>
  
  <pre><code>    url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/Lists(guid'bb392616-24ee-47e2-9365-f17400348373')/items?$select=Title,AT_ARMATECproducts/Title&amp;$expand=AT_ARMATECproducts/Title",
  </code></pre>
  
  <p>Where AT_ARMATECproducts is the lookup field in the ARMATEC Product Models List. AT_ARMATECproducts is a lookup to the ARMATEC Products list which grabs the titles. </p>
  
  <p>So, it turns out the lookup list was under a different name for some reason, it the list it shows up as AT_ARMATECproducts but seems to actually be AT_Products1.</p>
  
  <pre><code>url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/Lists(guid'bb392616-24ee-47e2-9365-f17400348373')/items?$select=Title,AT_Products1/Title&amp;$expand=AT_Products1/Title",
  var parent = data.d.results[index].AT_Products1;
  </code></pre>
  
  <p>now returns [object object], when I tried .Titles it returned with the Titles of the List not the lookup list. And when I tried .AT_Products1.Title it returned with undefined.</p>