About the limitation of the literal object syntax
<p>I know that the limitation of the literal object syntax is that the names has to be literal.</p>

<p>By the way I need to accomplish the following task, which way do you recommend me?</p>

<p>I have an object obj1 which I want traverse and then pass to another function which accept only literal object like parameter.</p>

<p>I wrote just the basic example to get the basic idea of what I am asking.</p>

<p>The problem is on the last loop, see the inline comments.</p>

<pre><code>obj1 = {k1 : 1} // simple literal object

fn = function (json) {
    // this function can accept just  literal object 
    console.log("result: ", json); // {key : true}, but I want {k1 : true}
}

for (key in obj1) {
    obj = [];
    fn ({
        key : true // I want the key to be k1 and not key
    })
};
</code></pre>
