title: Angular is storing data from JSON response keeping double quotes (%22)
body: <p>I have a PHP script returning this:</p>
  
  <pre><code>{"result": "0", "token":"atoken" }
  </code></pre>
  
  <p>the script is called with Angular:</p>
  
  <pre><code>$http.post( API["R001"], $scope.user, {}).then($scope.postSuccess, null);
  </code></pre>
  
  <p>and on success I process the response with this:</p>
  
  <pre><code> $scope.postSuccess = function(response) {
  
      if(response.data.result == "0") {
          console.log(response.data.token);
          $cookies.putObject("token", response.data.token, {'path':'/'} );
          return;
      } ... 
  </code></pre>
  
  <p>Now the problem is that the cookie is stored with this value:</p>
  
  <pre><code>%22atoken%22
  </code></pre>
  
  <p>that is keeping the double quotes. </p>
  
  <p>Console.log() returns the value without quotes.</p>