I have this kind of array:
var someArray = ['9213','9234'];
I want to do the following have the following result:
var obj = {
9213:true,
9234:true
}
How can i achieve this? something like:
obj = [];
_.each(someArray, function(currentNum,i){
obj.push(); //here i should do something
})
{}) why are you initialising an array ([])?