Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Converting a JSON Text to a JavaScript Object
- A common use of JSON is to read data from a web server, and display the data in a web page.
- For simplicity, this can be demonstrated using a string as input.
- First, create a JavaScript string containing JSON syntax like this:
- var text = '{ "employees" : [' +
- '{ "firstName":"John" , "lastName":"Doe" },' +
- '{ "firstName":"Anna" , "lastName":"Smith" },' +
- '{ "firstName":"Peter" , "lastName":"Jones" } ]}';
- save it "domo" for example
- =============
- To download the full prog to convert : http://infopade.com/4pyu
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement