Saturday 31 August 2013

function, JSON, and variable

function, JSON, and variable

I've a problem with creation a function. For example I have a parsed json
date, I want to get value of 'test' and return it.
function returnVal(name) {
parsedJSON = JSON.parse('{"test": "hello"}');
return parsedJSON.name;
}
Thanks for any advices, and excuse me for my bad English :)

No comments:

Post a Comment