i want to create a structure like that:
[{title:'Imágenes', extensions:'jpg,gif,png'}, {title:'Todos', extensions:'*'}]
but i need to create it from a string, in this way (in "js+jquery+php rare mode"):
items = 'Imágenes jpg,gif,png|Todos *'.split('|').each(function() {
list(title, ext) = explode(' ', $this);
filters[] = array('title' => title, 'ext' => ext);
});
i found structures like:
var theStatus = new Object();
function testIt() {
theStatus.Home = 'mouseover';
theStatus['Place'] = 'click';
for (var i in theStatus)
{
alert('theStatus[\''+i+'\'] is ' + theStatus[i])
}
}
and like:
$.alerts = {
verticalOffset: -75,
horizontalOffset: 0,
repositionOnResize: true,
overlayOpacity: .01,
overlayColor: '#FFF'
}
but i cant do nothing functional.
Thanks in advance.