Here is the scenario to consider (view plunker here: http://plnkr.co/edit/fOJ5zRvqCKvOC3olik8S?p=preview):
https://i.sstatic.net/8fz6s.png
<input ng-model="x" type="text">
<button ng-click="add(x)"> push input's value </button>
The text-input contains a JSON string as its value (manually inputted):
{ "i":3, "j":5 }
I want to transfer this value and then push it into an array in the controller. Currently, there is an escaped version of the JSON string in the array that I want to avoid.
What should my escape/unescape strategy be? Where should I start?