I have a multidimensional object (it's basically an array):
Object = { 1 : { name : bob , dinner : pizza }, 2 : { name : john , dinner : sushi }, 3 : { name : larry, dinner : hummus } }
I want to be able to search the object/array for where the key is "dinner", and see if it matches "sushi".
I know jQuery has $.inArray, but it doesn't seem to work on multidimensional arrays. Or maybe I'm wrong. indexOf also seems to only work on one array level.
Is there no function or existing code for this?
Object
is reserved in Javascript,Object
is the object object, ie the mother of all objects. – adamse Mar 3 '11 at 14:15