title: How to use a variable value for the key of another object?
body: <p>I have something like :</p>
  
  <pre><code>var myMenu= [
    {
      'My English Title':function(menuItem,menu) 
                         { ... }
    }];
  </code></pre>
  
  <p>Now, I want the replace 'My English Title' by an other JSON structure value <code>LOC.MENU_TITLE</code>.</p>
  
  <p>I have try:</p>
  
  <pre><code>var myMenu= [
    {
      LOC.MENU_TITLE:function(menuItem,menu) 
                         { ... }
    }];
  </code></pre>
  
  <p>But it doesn't work. Any one can give me an hint of how to get JSON value inside a JSON variable?</p>
  
  <p>Edit:
  This is to use the <a href="http://www.javascripttoolbox.com/lib/contextmenu/index.php" rel="noreferrer">Context Menu of Jquery</a> but I got a problem with all solutions below and it's when it's time to pass the String for the Separator. It doesn't show the separator because it pass the string into an object instead of just the string.</p>
  
  <p>Example:</p>
  
  <pre><code>var menu1 = [
    {'Option 1':function(menuItem,menu) { alert("You clicked Option 1!"); } },
    $.contextMenu.separator,
    {'Option 2':function(menuItem,menu) { alert("You clicked Option 2!"); } }
  ];
  </code></pre>