Value corresponding to the index.
If the node is a mapping, return the value corresponding to the first key equal to index. containsKey() can be used to determine if a mapping has a specific key.
To get element at a null index, use YAMLNull for index.
NodeException if the index could not be found, non-integral index is used with a sequence or the node is not a collection.
writeln("D:YAML Node opIndex unittest"); alias Node.Value Value; alias Node.Pair Pair; Node narray = Node([11, 12, 13, 14]); Node nmap = Node(["11", "12", "13", "14"], [11, 12, 13, 14]); assert(narray[0].as!int == 11); assert(null !is collectException(narray[42])); assert(nmap["11"].as!int == 11); assert(nmap["14"].as!int == 14);
Get the element at specified index.
If the node is a sequence, index must be integral.