The "in" operator in a conditional expression

Hi everyone,

While working on Quest script parser (if you are curious or would like to participate, you can take a look at its repository), I am parsing the Core scripts, and I stumbled upon this piece of code:
if (result["key"] in current_value)

Couldn't find in the documentation what the "in" operator should do. Anyone knows what this operator should do?


It will return true if result["key"] is in the array or is a key in the dictionary current_value.

If you want to see if current_valuehas an attribute:

if (HasAttribute(current_value, result["key"]))

Many thanks!


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums