View Single Post
Old 12-04-2012, 03:42 PM   PM User | #1
tomharto
Regular Coder

 
Join Date: Jul 2010
Location: Sheffield
Posts: 796
Thanks: 91
Thanked 18 Times in 18 Posts
tomharto is on a distinguished road
How do I loop through this JSON?

The JSON that I get returned is this.

[{"name":"hpfa","addressLine1":"","addressLine2":"","town":"","county":"","postcode":"","contactName" :"","email":"","tel":"01442 766 285"},{"name":"hartford","addressLine1":"","addressLine2":"","town":"","county":"","postcode":"","co ntactName":"","email":"","tel":""},{"name":"hampshire","addressLine1":"","addressLine2":"","town":"" ,"county":"","postcode":"","contactName":"","email":"","tel":""}]

I need to loop through it and add each of the name elements to a javascript array. How would i do this?
tomharto is offline   Reply With Quote