Community discussions

MikroTik App
 
iamarpit
just joined
Topic Author
Posts: 2
Joined: Fri Nov 26, 2021 4:07 pm

define globals by iterating array

Fri Nov 26, 2021 4:11 pm

Hi, I am new to scripting I was wondering if there is a way to define globals from an array something like this..
:global env { "foo"="bar"; "foo2"="bar"; "baz"="foo" }
:foreach key,value in=$env do={ :global $key $value }
I tried that but it didn't work coz of the :global <name>, any alternatives.. ?

Thanks

Who is online

Users browsing this forum: No registered users and 24 guests