How to convert string to object in Angularjs
<p>I have a string like :</p>

<pre><code>$scope.text = '"{\"firstName\":\"John\",\"age\":454 }"';
</code></pre>

<p>and I want to convert to js object:</p>

<pre><code> $scope.tmp =  {"firstName":"John","age":454 };
</code></pre>

<blockquote>
  <p>Note: <code>JSON.parse()</code> doesn't work!!</p>
  
  <p>It's my sample in <a href="http://codepen.io/essvision/pen/PzjGpQ" rel="noreferrer">codepen</a></p>
</blockquote>