I have a JSON string called EmployeeList being passed back to my webpage. It is details being read in C# from an XML file. SO it contains details for two test employees.
it is below:
"[{"EmployeeId":"33","Name":"Test Name 1","Phone":"1234","Email":"test@hotmail.com"},{"EmployeeId":"31","Name":"Test Name 2","Phone":"1234","Email":"test2@hotmail.com"}]"
I wanted to use the below then to turn this into a Javscript object so that I can extract and maniuplate fields.
var obj = jQuery.parseJSON(EmployeeList);
alert(obj);
However my output from the alert is [object Object],[object Object]. Is there something I am missing or doing wrong here?
This is correct response as your List is an Array of Objects.
To get name of employees you can get them like this: