PDA

View Full Version : pls solve this



nagrgk
06-02-2010, 11:29 AM
Hello guys,

Please suggest me to parse following string using json and javascript.

{ "form": { "name":"General GCH form", "fields":[ {"name":"field_id_2270", "label":"Your Full Name", "description":"Your first and last name", "type":"text field", "mandatory":"true", "attributes":["size":"40"]} , {"name":"field_id_2278", "label":"Number of places to reserve", "description":"How many are you registering for?", "type":"combo box", "mandatory":"true", "attributes":[]}
]}}

I am new to this language and looking for code since one week.

advanced thanks
nagaraja kharvi

djr33
06-02-2010, 12:01 PM
What exactly do you want to do? Do you want to parse that into an array?

Please, always try google first:
http://www.google.com/search?q=json+parse

This looks helpful:
http://www.json.org/js.htm

This looks fun:
http://json.parser.online.fr/