View on GitHub

NullCoaliescing

Null Coaliescing method using 4D

PATH_COALESCE

Get the first defined value from an object.

Usage

$obj:=New object("a"; New object("b";"d"))
PATH_COALESCE($obj;New collection("a.z";"d";"a.b";"dot.dot");$defaultValue)

Why?

Sometimes objects could define something with different path, mostly if parsed from JSON with different format version.

Test

see test_PATH_COALESCE