Input file has records and subrecords
^RECORD(1,2,3,"key-1",1)
abc
^(2)
cde
^(3)
fgh
^(4)
ijk
^RECORD(1,2,3,"key-2",1)
lmn
^(2)
opq
^(3)
rst
^(4)
uvw
transform to something like:
["key-1": ["abc","cde","fgh","ijk"], "key-2": ["lmn","opq","rst","uxw"]]