3
"[{"poll_watcher_id":5,"precinct_id":"","candidate_id":1,"count":"123"},
  {"poll_watcher_id":5,"precinct_id":"","candidate_id":9},
  {"poll_watcher_id":5,"precinct_id":"","candidate_id":6},
  {"poll_watcher_id":5,"precinct_id":"","candidate_id":3},
  {"poll_watcher_id":5,"precinct_id":"","candidate_id":7},
  {"poll_watcher_id":5,"precinct_id":"","candidate_id":4}]"

This output is just a String , what i want is to convert it into array of object for me to use the data in this output

1
  • Where did the string come from? Commented May 3, 2016 at 3:57

2 Answers 2

7

By using JSON.parse on the string.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for response I already solved it using angular.fromJson
-1

Deserializes a JSON string use

angular.fromJson(json);

angularjs.org

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.