I have an array full of values, myArray[]
I'm trying place this array in a hash table to pass over the socket from my node.js server.
I want the array in the hash table to contain all the same information as myArray.
var item = [
{ hashArray: [] }
];
for (var i = 0; i < myArray.length; i++) {
item.hashArray.push(myArray[i]);
}
I receive the error that I can't call push of undefined.
Thanks for any help!
EDIT: Thanks very much everyone, I see what I was doing wrong!