Docs aren't helping me on this one. I have:
var foo = {'item_no' : '185-N', 'name': 'Chair'};
var bar = {'item_no' : '185-N', 'name': 'Bed'};
compare(foo,bar) gives "[object Object] and [object Object] can not
be compared"
objCompare does the same thing.
My main question: what do I do to compare stuff like this?
Further, I need something that gives me the difference of two objects
in form of:
findDifference(foo, bar) would return {'name':'Bed'}
and
findDifference(bar, foo) would return {'name':'Chair'}
I know there's probably nothing in the MB stock that does this, but I
assume it has some useful functions that can assist me in making my
code shorter. Any hints would be greatly appreciated.
Thank you.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---