Filter out value if it is not contained in list

Hi,

I cannot find a way to filter out values if their value is in a list. So I need a way to do a logical negation? How can you do this in flux?

data
    |> filter(fn: (r) => r["field"] not in list("abc", "cde"))

I dont want to do for each (possibly many values):

data
    |> filter(fn: (r) => r["field"] != "abc" and  r["field"] != "cde"))**strong text**

Unfortunately this highlights one of the frictions with flux, some things are more easily expressed in sql, at which point you may want to consider just using influxql which will probably end up easier in the long run (refer to v3 generation docs)

But If you need to stick with flux language, you might be able to do what you want to with the exists operator (if it supports the not negation - untested)

You may also be able to do what you want with a regex. This page discusses the nuances and how to measure alternative options to decide what is best for your data

Thanks! Via doing like:

data
    |> filter(fn: (r) => r["field"] != "abc" and  r["field"] != "cde"))**strong text**

should work?