...
Code Block | ||||
---|---|---|---|---|
| ||||
{"bar" : {10:"I like cheese"}} |
get(path)
Returns the value at the given hash-path. This is the same as the foo{path}
Code Block | ||||
---|---|---|---|---|
| ||||
a = {
"colors" : "many",
"pi" : [3,1,4,1,5,6,9],
"foo" : {"bar" : {10:"I like cheese"}}
};
a.get(["foo", "bar", "10"])
// "I like cheese"
a{["foo", "bar", "10"]}
// "I like cheese" |
delete()
The delete()
operator takes a hash path argument designating the member of the original data structure that should be deleted. The delete()
operator returns a new data structure with the specified member deleted. If the path is invalid, nothing is deleted and the new data structure is identical to the original. For example:
...