This simple script is much easier to work with data structures and their accessors. Combine them into a chain (string) and get the necessary information. Works in one row, and understand:
lists
maps
grids
arrays (1D & 2D)
Asset contain the demo.
End User Licence Agreement (EULA).