'nested' Tag

  • Setting a Nested Object with a String Key

    February 9, 2010

    In one of the projects that I’m working on I had to setup a property of an object in a general way. In order to do so, i wrote the following function: function setValue(key,value,obj){ obj[key.toString()] = value; } so calling the functuion like so var obj = { a:1,b:2,c:3 }; setValue( "a" , 2 , [...]

 
Powered by Wordpress and MySQL. Theme by openark.org