I want to set for example :
myarray[3922] = {
name : 'john'
family : 'doe'
}
which did not make null indices like this :
myarray[0] = null
myarray[1] = null
.
.
.
myarray[3920] = null
myarray[3921] = null
myarray[3922 = { name : 'john' family : 'doe' }
so that I can have direct access to myarray[3922].name .
I use these for saving in localStorage, like this: how to set value to some desired index of array in javascript?
thanks in advance