<script type="text/javascript">
var sumobj = { 'foo':"apple",'bar':"banana" };
var prop1 = 'foo';
document.write( sumobj.prop1 + "<br />" );
</script>
I'd like to be able to do something similar to the above but this displays 'undefined' presently.
Is there anyway to do this, or something close to it?