hasAnyKey

Check if Json has key

@safe
bool
hasAnyKey
(
Json json
,
string[] keys
,
bool deepSearch = false
)

Examples

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

Meta