Menu
Hi there.
Let’s say I get a user-custom JavaScript object, with an unknown number of properties, all of them having custom, unknown names:
[code]
var object = {
‘foo’: 1,
‘bar’: 2,
…
‘baz’: n
}
Now, let’s say I would like to count the number of properties I have inside the object – can I do it? And if so, how?
Plus, can I find out in some way what are the names of the properties, so I could use them?