I found this forum post and did some tests. The result is the code below that seems pretty neat, tidy and readable, and works as I expected.
:global UserDatabase [:toarray ""];
# The key for the array is the username of the user.
# The structure of every user record is as follows:
# password | email | tel | last IP | something | something else |
:set ($UserDatabase->"username1") {"supersecret";"username1@example.com";"+123456789";"0.0.0.0";0;0};
:set ($UserDatabase->"username2") {"megasecret";"username2@example.com";"+987654321";"0.0.0.0";0;0};
# Printing specific property (column) of the data for specific user:
:put ($UserDatabase->"username1"->0);
Can someone elaborate if this approach has some issues or disadvantages?
What is the name of this data type I’ve created? Is it called key array of arrays?