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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -