how to create a complex javascript structure
<p>i want to create a structure like that:</p>

<pre><code>[{title:'Imágenes', extensions:'jpg,gif,png'}, {title:'Todos', extensions:'*'}]
</code></pre>

<p>but i need to create it from a string, in this way (in "js+jquery+php rare mode"):</p>

<pre><code>items = 'Imágenes jpg,gif,png|Todos *'.split('|').each(function() {
  list(title, ext) = explode(' ', $this);
  filters[] = array('title' =&gt; title, 'ext' =&gt; ext);
});
</code></pre>

<p>i found structures like:</p>

<pre><code>var theStatus = new Object();
function testIt() {
  theStatus.Home = 'mouseover';
  theStatus['Place'] = 'click';
  for (var i in theStatus)
  {
    alert('theStatus[\''+i+'\'] is ' + theStatus[i])
  }
}
</code></pre>

<p>and like:</p>

<pre><code>$.alerts = {
  verticalOffset: -75,
  horizontalOffset: 0,
  repositionOnResize: true,
  overlayOpacity: .01,
  overlayColor: '#FFF'
}
</code></pre>

<p>but i cant do nothing functional.</p>

<p>Thanks in advance.</p>
