[#BloombergLP-bdljsn-Json-contains]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/Json.adoc[Json]::contains
:relfileprefix: ../../../
:mrdocs:

Return whether the held object contains a member with `key`&period;

== Synopsis

Declared in `&lt;bdljsn&lowbar;json&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
contains(std::string&lowbar;view const& key) const;
----

== Description

Return `true` if the `JsonObject` held by this `Json` object contains a member whose key is equivalent to the specified `key`, and return `false` otherwise&period; The behavior is undefined unless `true &equals;&equals; isObject()`&period;

== Return Value

`true` if a member with the specified `key` is present, and `false` otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *key*
| UTF&hyphen;8 member name
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
