With a single property this is fairly easy:
var jsonobj = { \"test\": \"ok\" } var propname = \"test\"; // Will alert \"ok\" alert(jsonobj[propname]); <
You can write a little function to split the string and then access each piece in turn. For example:
function getProperty(propname, object) { var props = propname.split('.'); var obj = object; for (var i=0; i
Obviously it nees a little extra coding to check for null objects, valid properties, etc.