hasKey

Searching key in json, if depth = true also in subnodes

@safe
bool
hasKey
(
Json json
,
string key
,
bool deepSearch = false
)

Examples

auto json = parseJsonString(`{"a":"b", "c":{"d":1}, "e":["f", {"g":"h"}]}`);
assert(json.hasKey("a"));
assert(json.hasKey("d", true));

Meta