I am developing a snippet that parses an HTML page. The extracted data needs to be transformed in several ways. The typical way to do that in a simple programming language is to use arrays, ordered, unordered and/or associated arrays (key/value lists).
From the documentation, I can't seem to find the syntax for manipulating lists in a code block. Specifically, I would like to know about:
- Assigning additional key/value pairs to an existing list. (pop and pull functions?)
- Multiple assignment (adding multiple values in one statement)
- Multidimensional assignment (can it be done in one go or would I need to loop through loading single-dimension lists and then adding those to a multi-dimensional one?)
- Addressing of list properties: list length (i.e. item count), all items. (like
my_list[*]
) - Variations on these: for ordered lists, non-ordered, key/value, multidimensional
- Can you mix/match list types in dimensions? An ordered list of sets of three key/value pairs, for instance?
- Addressing all the keys and/or all the values.
I'm sure most of these operations exist because I see bits and pieces in the answers to questions on the forum, but I think the community as a whole would be helped tremendously by a dose of reference docs. Many thanks!