Help with if statement script

I need to create an if statement based on a condition that the $leaseActMAC is not equal to some mac address in a fixed array, how do I achieve that?

:local mac {"00:11:22:33:44:AA"; "00:11:22:33:44:BB"; "00:11:22:33:44:CC"}
:if ($leaseActMAC != $mac) do {

is this code snippet correct?

You need to translate YOUR need into code…
Pratically you want FIND inside $mac array if at least $leaseActMAC is present at least one time…

:local mac {"00:11:22:33:44:AA"; "00:11:22:33:44:BB"; "00:11:22:33:44:CC"}
:if ([:find $mac $leaseActMAC] > 0) do={

( do not forget = between do and { )

thank you for the syntax help!
but shouldn't it be

:if ([:find $mac $leaseActMAC] = 0) do={

to execute the if statement when $leaseActMAC is not equal to that address array?
are those quotes in the array mandatory?

Ah, I forgot the ! on translation…
The " " ara mandatory, do not exist “one array of MACs”, but “array of strings”.

Or you find something, or you find “nil”, you can not have zero, 0 is a result, and find is not a “count”… If the find not find you find nothig, “nil”…

if you didn’t find it in the array then…

:local mac {"00:11:22:33:44:AA"; "00:11:22:33:44:BB"; "00:11:22:33:44:CC"}
:if ([:typeof [:find $mac $leaseActMAC]] = "nil") do={

you’ve been beautifully clear, it worked out flawlessly, thank you a lot @rextended