Close. You need to declare the outer array & use parens+comma to concat values to the array.
:global interfaces [:toarray ""]
:foreach i in=[/interface bridge port find where pvid=80] do={
:local bport [/interface bridge port get number=$i];
:put ($bport->"interface");
:set $interfaces ($interfaces,$bport);
}
:global interfaces [:toarray ""]
:foreach i in=[/interface bridge port find where pvid=80] do={
:local bport [/interface bridge port get number=$i];
:put ($bport->"interface");
:set $interfaces ($interfaces,$bport);
}
Statistics: Posted by Amm0 — Sun Dec 31, 2023 10:54 pm