I am trying to write a script that reads an input .txt file that stores a 3D(?) matrix on each line (each line is a different matrix), I have managed to cut the file's lines into separate strings, now I have to read one of the strings (the first line's), which is just a long line of square brackets, commas, and numbers.
//example
[[[[1, []], [6, [1, 2, 11]], [0, [11]]], [[0, [2]], [0, [2]], [0, [11]]], [[0, [1]], [6, []], [0, [11]]]], [[[0, []], [0, []], [0, [11]]], [[0, []], [0, []], [0, [11]]], [[0, [2]], [0, [1,2]], [0, [11]]]], [[[0, [2]], [6, [11]], [0, [11]]], [[0, [6, 4]], [0, []], [0, [11]]], [[0, [1, 2]], [6, []], [0, [2, 11]]]]]
3 columns, 3 rows, and 3 "layers" (there are always 3 layers, but the amount of columns and rows will be different for each file's first line matrix)
the matrix starts from the top left (1x, 1y, 1z) and goes through each 'dimension' backwards (e.g. x1 y1 z1 -> x1 y1 z2 -> x1 y1 z3 -> x1 y2 z1 -> x1 y2 z2, etc),
each cell of the matrix looks like [int, [<comma separated list of ints, nothing if there's no ints>]]
The example above is relatively small compared to some of the other files' first line matrices (the average size of the matrices is 72 x 43 x 3).
And because the matrix's size varies between files, I cannot brute force it.
I can read the matrices by hand, but I have no idea how to tell C# how to read the matrices. I am not very skilled in C# (or coding in general) so I do not know where to start.