I have a javascript object and I would like to count the number of records in that object. I have tried length and size however I am not getting a count.
Object
var person = new Object();
person.name = null;
person.age = null;
person.gender = null;
I then populate this Object with data like;
person.name = 'John';
person.age = 20;
person.gender = 'M';
person.name = 'Smith';
person.age = 22;
person.gender = 'M';
I would like to return a count with two rows of data.