title: Javascript var query returning [object Object]
body: <p>I've got a JavaScript file which is querying a SharePoint list. I'm querying two drop down lists. The first - LifeCycleStatus - comes back fine, but the Priority drop down comes back with <a href="https://i.stack.imgur.com/BxRkE.png" rel="nofollow noreferrer">screen grab</a> [object OBJECT]. I think it has to do with the var query string. I've added the 'Priority' column to the var query but it doesn't seem to be making any difference</p>
  
  <pre><code>var query = "http://collaboration- 
     de.vxxx.com/sites/it/SystemInventory/_vti_bin/listdata.svc/Devices?$expand=LifeCycleStatus&amp;Priority&amp;$filter=Id eq " + window.DeviceId + "";
  </code></pre>
  
  <p>Full JavaScript below: </p>
  
  <pre><code>function getDeviceDetails() {
  var txtTitle = "";
  var txtOverview = "";
  var txtAccessories = "";
  var txtDevicetype = "";
  var txtTypicalDeviceUsage ="";
  var txtKnownSystemIssues ="";
  var txtLifeCycles = "";
  var txtTrafficlight = "";
      var tempLCS2 = "";
  
  var query = "http://collaboration-dev.xxx/sites/it/SystemInventory/_vti_bin/listdata.svc/Devices?$expand=LifeCycleStatus&amp;Priority&amp;$filter=Id eq " + window.DeviceId + "";
      var call = $.ajax({
          url: query,
          type: "GET",
          dataType: "json",
          headers: {
              Accept: "application/json;odata=verbose"
          }       
      });
  call.done(function (data,textStatus, jqXHR){
  $.each(data.d.results, function(index, item) {
          var tempID = item.Id;
          var tempTitle = item.Title;
  
  
  
  
           var LifeCycleStart = item.DeviceAvailableFrom;
  
  
  
          var LifeCycleStatus = item.LifeCycleStatusValue;
          var DeviceOverView = item.Description;
          var AccessDetails = item.Accessories;
          var DeviceKind = item.Devicetype;
          var Usage = item.TypicalUsage;
          var DevicePriority = item.Priority;
  
  
          txtTitle = "&lt;p&gt;" + LifeCycleStart + "&lt;/p&gt;&lt;p&gt;" + LifeCycleStatus + "&lt;/p&gt;";
          txtOverview = "&lt;p&gt;" + DeviceOverView + "&lt;/p&gt;";
          txtAccessories = "&lt;p&gt;" + AccessDetails + "&lt;/p&gt;";  
          txtDevicetype = "&lt;p&gt;" + DeviceKind  + "&lt;/p&gt;";
          txtTypicalDeviceUsage = "&lt;p&gt;" + Usage + "&lt;/p&gt;";
          txtTrafficlight = "&lt;p&gt;" + DevicePriority + "&lt;/p&gt;";
         // txtKnownSystemIssues = "&lt;p&gt;" + KnownSystem + "&lt;/p&gt;"
      });
      $('#devicedetails').append($(txtTitle));  
      $('#deviceoverview').append($(txtOverview));
      $('#devicekind').append(txtDevicetype);
      $('#deviceacc').append(txtAccessories);
      $('#deviceuse').append(txtTypicalDeviceUsage);
      $('#devicestatus').append(txtTrafficlight);
  
  });
  
  
  
  
  
  call.fail(function (jqXHR,textStatus,errorThrown){
      alert("Error retrieving data: " + jqXHR.responseText);
  });
  </code></pre>
  
  <p>}</p>