Thanks, Raul
I've checked what "use" does with an example. I won't study its
details, though, not wanting
to crib. I will say though that the output is similar to my interim
results in processing the data.
My mistake appears to have been to keep the verbose format and try to
reproduce it, ie with
lots of indexing locations of brackets and so on and generally getting
in a muddle. As usual,
the key seems to be to find a decent data structure.
Nice to know it can be done, and can be understood! Congratulations!
Cheers,
Mike
On 22/12/2021 21:27, Raul Miller wrote:
use=: {{
depth=. +/\-/'[]'=/y
sel=. _1|.' .'E.' .'{~mask=.-.y e. '[,]'
vals=.".mask #inv mask#y
assert. (+/sel)=#vals
(sel#depth),:vals
}}
--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm