I have a file that contains a list like below:
attr1: attribute
attr2: name
attr3: city

attr1: attribute2
attr2: name2
attr3: city3
attr4: country
the file contains about 60k entries of this sort. The unique identifier is always on the ID line. Once I hit a new ID, I need to be able to retrieve all the attributes for that ID.
I am trying to do the following:
but this doesn't work and I also have to create an array that's large enough or small enough every time. Any tips on how to proceed will help very much.
thank you. JS

Check Solution