Here is a string I'm working with:
$scope.text = '"{\"firstName\":\"John\",\"age\":454 }"';
I am trying to convert it into a JavaScript object:
$scope.tmp = {"firstName":"John","age":454 };
Please note:
JSON.parse()
does not work in this scenario!You can view my sample on codepen