Link to home
Start Free TrialLog in
Avatar of ksd123
ksd123

asked on

Converting circular structure to JSON in Angularjs

I am using AngualrJS and via service call getting a response and it returns a JSON object like
response={TypeName:sample,MessageType:0,Message1: null,Message2:null,Foo:0}.

Open in new window

When I try to debug in angularjs  in  the code
var a= angular.fromJson(angular.toJson(response)) 

Open in new window

 //Getting error "TypeError: Converting circular structure to JSON"
 How can I fix this issue .Is this problem with API data or am i doing anything wrong in angularjs
ASKER CERTIFIED SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial