how to convert in json object?
I also tried the following.
$scope.getEval = function (str) {
return eval(str);
};
try {
s = $scope.getEval("\nexports = { emptyFunction: function () { \n exit(); }, getUserName: function () { if (!variable.global_name) { exit(changeFlowAndStep('get_user_name', 0, {global_first_time_done: false}, true)); } else { exit({variable:{global_first_time_done: true}}); } }}")
for (var i in s) {
s[i] = s[i].toString();
}
$scope.s = s;
console.log($scope.s)
} catch (e) {
console.log(e);
}