I have a scenario where I have to loop through the JSON string in template. I tried these 2 solutions but none of them are working properly: 1. Create a filter and pass it to ng-init:
< div ng-init="var1 = (COL_FIELD | FormatJson)">
<span ng-repeat="wut_detail in var1.wu_tester_detail"> {{wut_detail}}</span> </div>
Above filter converts the string to JSON object properly, but ng-init seems to be working abnormally it doesn't refreshes data properly on search.
Can anyone please help, how I can change the variable COL_FIELD to JSON object in the template without using ng-init.