Compare non dyamic objects

Anyone know a good way to filter an array of non dynamic objects using an object as a key? So I have a Tom object and I want to find all the people objects in an array of people that matches the Tom object. Match them based on public properties of the object.

I need some way to compare object properties to each other, but I can’t seem to use a for in loop because the objects aren’t dynamic it’s a custom class with public properties set in the constructor.

I’m guessing I would need to use describeType, with something like Fuzzy Match does (http://www.kirupa.com/forum/showthread.php?t=33714&highlight=compare+objects). Just can’t seem to wrap my head around it. If anyone has any insight into a method of doing this I would be very grateful.

Thanks!

Jesse

var matches:int=0
for (var key in object) if (object[key]==otherObject[key]) matches+=1;

[QUOTE=Felixz;2325747]

var matches:int=0
for (var key in object) if (object[key]==otherObject[key]) matches+=1;

[/QUOTE]

It doesn’t seem to find anything. I thought a for in only worked with a dynamic properties? Should I rewrite my object to have dynamic properties? Or is there another way to achieve this?