> What is "key"?  That's not in either one of your data structs.

Oops, sorry, didn't look closely enough.  But you can't use 'key' that
way.  Try this:

if (item[key].indexOf(options[key]) != -1)

Not sure what you're after with the indexOf though.

Reply via email to