Accepted answer

i think you want to access

snpsobj[ snplist[0] ]

by using bracket notation, snpsobj.snplist[0] would try to get the "snplist" property of your snpsobj object.

btw, instead of your for-in-loop to create the array with property names, you might want to use object.keys (even if you need to shim it to support old browsers).

Related Query

More Query from same tag