[#nlohmann-basic_json-0e-contains-01] = xref:nlohmann.adoc[nlohmann]::xref:nlohmann/basic_json-0e.adoc[basic_json<>]::contains :relfileprefix: ../../ :mrdocs: check the existence of an element in a JSON object == Synopsis Declared in `<nlohmann/json.hpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class KeyType> requires detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value bool contains(KeyType&& key) const; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#