Knockout JS [Object object] pulling properties
<p>I have an object in my JS sliced from an array:</p>

<pre><code>self.deploysToDevId = ko.computed(function() {
  var deployToDev = ko.utils.arrayFilter(self.builds(), function(build) {
    return build.buildType() == 'Deploy to Development';
  }, self);
  var deployToDevID = deployToDev.slice(0,1).id
  return deployToDevID;
});
</code></pre>

<p>This object is originally from an array called builds and is a build object. However, I am trying to get a property, the "id" of the build which is a property of build, and I want to be able to store this and return this as an object, however when I do the data-bind prints the text [Object object]</p>

<pre><code>self.getIdOfMostRecentDeploy  = ko.computed(function() {
  var idOfMostRecentDeploy = (self.deploysToDevId().id);
  return idOfMostRecentDeploy;
});
</code></pre>

<p>This should store the id of the object as "idOfMostRecentDeploy" but it is not doing so.</p>

<pre><code>      self.deploysToDevId = ko.computed(function() {
    var deployToDev = ko.utils.arrayFilter(self.builds(), function(build) {
        return build.buildType() == 'Deploy to Development';
        }, 
        self);
        var deployToDevID = deployToDev[0];
        return deployToDevID;
});
</code></pre>

<p>This is another way I have tried, this time trying to take the first object in the array and assign its id to a variable. although, I still just get [Object object]</p>