javascript - Getting issue to convert in JSON object -


this question has answer here:

i getting response mentioned below:

afmomformdetails has {\"signame\":\"qwer\",\"contname\":\"asdf\",\"signature\":\"zxcv\"} after move

var resstr = response; var retstr = resstr.substring(resstr.indexof("{"), resstr.indexof("}")+1); var strobj  = retstr.replace(/\\/g, ""); $scope.fdetails=json.stringify(strobj); 

i unable bind values in angularjs. can please me?

you getting json string, try parsing json.parse(), give object. bind object $scope.fdetails.

var resstr = '{\"signame\":\"qwer\",\"contname\":\"asdf\",\"signature\":\"zxcv\"}';  var obj = json.parse(resstr)  console.log(obj);


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

Python Tornado package error when running server -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -