title: Unable to get attribute from object in javascript but can print it to the console when logging its parent
body: <p>Unable to get attribute from object in javascript but I can print it to the console when logging its parent. It does appears as being an ordinary object. Why cant i access _id?</p>
  
  <p>The code below is in a function: <code>$scope.create = function() {</code> that gets called on submit of a form in my angular view:<code>&lt;form class="form-horizontal" data-ng-submit="create()" novalidate&gt;</code></p>
  
  <p>So heres the problem, in my function create:</p>
  
  <pre><code>     console.log($scope.account);
        var tmp=$scope.account;
        console.log('id:' +tmp._id);
  </code></pre>
  
  <p>Gives me:</p>
  
  <pre><code>      {"user":{"displayName":"David Karlsson","_id":"548217e5402b8b8c194d9c11"},"_id":"5483235cc0d8580000152f0b","__v":0,"created":"2014-12-06T15:40:12.682Z","amount":0,"interests":[{"rate":123,"date":"2014-12-30T23:00:00.000Z","_id":"5483235cc0d8580000152f0c"}],"desc":"","name":"Acount"}
  
        id:undefined
  </code></pre>
  
  <p>Changing the post method did not help: </p>
  
  <pre><code>    $scope.create = function() {
          // Create new Income object
        var copy = Object.assign({}, this.account);
        console.log(copy);
      }
  </code></pre>
  
  <p>Gives:</p>
  
  <p>TypeError: undefined is not a function
      at Scope.$scope.create (localhost:3000/modules/incomes/controllers/incomes.client.controller.js:12:29)
      at localhost:3000/lib/angular/angular.js:10880:21
      at callback (ocalhost:3000/lib/angular/angular.js:19237:17)
      at Scope.$eval (localhost:3000/lib/angular/angular.js:12788:28)
      at Scope.$apply (localhost:3000/lib/angular/angular.js:12886:23)
      at HTMLFormElement. (localhost:3000/lib/angular/angular.js:19242:23)
      at localhost:3000/lib/angular/angular.js:2853:10
      at forEach (localhost:3000/lib/angular/angular.js:325:18)
      at HTMLFormElement.eventHandler (localhost:3000/lib/angular/angular.js:2852:5)</p>