> If you have an object list ex:
> var olist = {"daniel":4, "Tom":5};
>
> Is there any way to reference the objects fields w/o knowing their
> names?
You can enumerate the enumerable properties with a for..in loop e.g.
for (var propertyName in olist) {
alert(propertyName + ': ' + olist[property]);
}

Signature
Martin Honnen
http://JavaScript.FAQTs.com/
>If you have an object list ex:
>var olist = {"daniel":4, "Tom":5};
[quoted text clipped - 5 lines]
>term). I've tried looking on google but perhaps I'm not using the
>correct search terms.
You could use a hash, sorry, "object", to find out how two objects' keys
overlap.
var list1 = {"daniel":4, "Tom":5, "one": 1};
var list2 = {"daniel":6, "Tom":7, "two": 2};
var overlap = {};
function insert (list, bitmask) {
var p;
for (p in list) {
if(!overlap[p]) overlap[p] = 0;
overlap[p] = overlap[p] | bitmask;
}
}
insert(list1, 1);
insert(list2, 2);
// insert(list3, 4); // powers of 2
Now, what does it do? It creates an object with all keys used in any
object in the input, with a bitmask flag value indicating where it's
found: 1 if only in list1, 2 if only in list2, 3 if in both.
Likewise, you can add a third list, with bitmask 4, a fourth with bitmak
8... and get different integers depending on what lists the items are
in.
So you could just check that all entries in overlap have an associated
value 3.
(n.b. an item that isn't in any input list, won't appear in the
resulting object "overlap" either.)

Signature
Bart.