Hey Thomas,
from what you're saying it seems that we're trying to tackle the same
issue. Have a look at this it may be helpful:
http://groups.google.com/group/comp.lang.javascript/browse_thread/thread/83281987eccf68be

What's your solution?

On Feb 21, 4:24 pm, Thomas Jaggi <thomas.ja...@gmail.com> wrote:
> Great, that's it. Thanks a lot!
>
> The indexOf is just an example. The options are actually some kind of
> filters and I want to check each item against each filter. Depending
> on the filter It could be indexOf.
>
> On 21 Feb., 14:44, Mike <mal...@gmail.com> wrote:
>
> > > 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