I'd like to build a structure in Javascript. I think it will be an array in which each element will have multiple properties.
For example
var person = new Object();
person[0].firstName="John";
person[0].lastName="Smith";
person[0].phoneNumber="555 1234";
person[1].firstName="Jane";
person[1].lastName="Robinson";
person[1].phoneNumber="555 6789";
etc.
and then things like
document.write(person[0].firstName);
This doesn't seem to work.
What am I doing wrong? Is there a way to achieve this type of structure in Javascript?
I've looked in various tutorials but none of the examples cover this type of thing.