Basically I want to create a structure that can hold: $obj = { a:1, b:2, ... }, so you can query $obj["a"]
Alternatively, can I create a custom data struct where I can do $pair[] = [ {key:value}, {key:value} ], where each "pair" is key-value map.
Looking at the doc (and I have difficulty finding a spec for MEL), I only see array/vector etc., absolutely no data structure that can hold a "key:value".
(Yes I do need MEL as I am on Maya LT; I can workaround these problems just asking if I am missing something.)
Replies
The only suggestion I could give would be to use dags in the scene to emulate it. For example having groups with custom attribues. A group named with your "key" and a custom attribute being your "value". This way you can quickly iterate over the list of groups (for example with listRelatives and then query the attribute if the key is matched).
edit, saw "LT" just as i submitted. nevermind.