FghjNode.get

struct FghjNode
pure
get
(,
in char[][] keys...
)

Parameters

value FghjNode

default value

keys char[][]

list of keys

Return Value

Type: FghjNode

[keys] if any and value othervise.

Examples

import fghj;
auto text = `{"foo":"bar","inner":{"a":true,"b":false,"c":"32323","d":null,"e":{}}}`;
auto root = FghjNode(text.parseJson);
auto value = FghjNode(`false`.parseJson);
assert(root.get(value, "inner", "a").data == true);
assert(root.get(value, "inner", "f").data == false);

Meta