hasAllKeys

Checks if every key is in json object

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

Examples

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

Meta