What is the best way to store the next message in a data structure for easy access?
"A = a bc, B = 156, M = 3, G = 1, H = 10, G = 2, H = 20, G = 3, H = 30, X = 23.50, Y = XYZ"
The above consists of key / value pairs of the following values:
A = a
B = 156
F = 3
G = 1
H = 10
G = 2
H = 20
G = 3
H = 30
X = 23.50
Y = Hug
The hard part is the keys F, G, and H. F indicates the number of elements in the group whose element consists of G and H.
For example, if F = 3, there are three elements in this group: Point 1: G = 1, H = 10 Point 2: G = 2, H = 20 Point 3: G = 3, H = 30
In the above example, each element consists of two key / pair values: G and H. I would like the data structure to be flexible so that it can handle if the element increases its key / pair values. As much as possible, I would like to maintain the order that it appears in the row.
UPDATE: I would like to save key / value pairs as strings, even if the value often appears as a float or other data type, such as a map.