[#nlohmann-basic_json-0c-contains-07] = xref:nlohmann.adoc[nlohmann]::xref:nlohmann/basic_json-0c.adoc[basic_json]::contains :relfileprefix: ../../ :mrdocs: check the existence of an element in a JSON object given a JSON pointer == Synopsis Declared in `<nlohmann/json.hpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- bool contains(xref:nlohmann/basic_json-0c/json_pointer.adoc[json_pointer] const& ptr) const; ---- == Return Value whether the JSON pointer resolves to an existing element == Parameters [cols="1,4"] |=== | Name| Description | *ptr* | JSON pointer to the element to check for |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#