:global monitor [/interface ethernet monitor sfp1 once as-value]
:put ($monitor->"sfp-tx-power")
:put ($monitor->"sfp-rx-power")
:global monitor [/interface ethernet monitor sfp1 once as-value]
:put ($monitor->valuewhatyouwant)
Thanks man, i will try itYou should use an array for this. You can loop across an array using foreach. An array index can be a string.
:global ArrayName;
:set ($Arrayname->"value1") 1;