Save array to file big bug

Hello. I am very tired to collect the Mikrotik bugs or maybe issues. Today it seems to find one. So there is an array
:global mainSSID
:global reserveSSID
:global networks {mainssid=“”;reservessid=“”}

:set mainSSID test
:set reserveSSID work

:set fileID [/file find name=“networks.txt”]

if ($fileID=“”) do={
/file print file=“networks.txt”
:delay 1s #Hhahah - it is a delay for correct the mikrotik OS bug when the file can’t be created ontime and next command can’t make a content
/file set [find name=“networks.txt”] contents=“”
:set ($networks->“mainssid”) $mainSSID
:set ($networks->“reservessid”) $reserveSSID
/file set [find name=“networks.txt”] contents=$networks
}

:set networks [/file get networks.txt contents]


So. Every man can think that the network variable must be an array with a values of another variables, for example console command
:put ($networks->“mainssid”) $mainSSID
and the output must be:
test

BUT THE OUTPUT OF MIKROTIK MAGIC WORK IS NOTHING - empty!

If you try to read the array by pick command you can see that all content of file is zero element of array. So the array is destructed now!

I try to conver the content to string (:tostr) next :toarray - nothing. The same problem

So dear, How can you explaing such thing?
ROS 6.13

RouterOS never had this functionality to convert printed array data back to array.

You either need to parse each element from file and construct an array or try to put it in {} and then convert with :toarray (haven’t actually tested if it works).