I've got a little problem with a JavaScript function (I'm pretty new to JavaScript in general) to which I pass a String(cat) and a JSON string (args) I guess you know what I like to achieve: if I pass foo as 'cat' I'd like to parse args.foo:
function addchardata(cat, args){
var data= JSON.parse(args+'.'+cat); ///this does not work...
}