dynamic val(String path, [ value = unspecified ])

If only path is specified, this method fetches the value of the node at the given path. If value is also specified, it will set the value of the node at the given path to the specified value, and return that value.

Source

dynamic val(String path, [value = unspecified]) {
  if (value is Unspecified) {
    return this[path].lastValueUpdate.value;
  } else {
    updateValue(path, value);
    return value;
  }
}