[#nlohmann-basic_json-00-operator_subs-00e]
= xref:nlohmann.adoc[nlohmann]::xref:nlohmann/basic_json-00.adoc[basic&lowbar;json]::operator&lsqb;&rsqb;
:relfileprefix: ../../
:mrdocs:

Subscript operator

== Synopsis

Declared in `&lt;nlohmann&sol;json&period;hpp&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename BasicJsonType&gt;
requires detail&colon;&colon;is&lowbar;basic&lowbar;json&lt;BasicJsonType&gt;&colon;&colon;value
&lsqb;&lsqb;&lowbar;&lowbar;deprecated&lowbar;&lowbar;&rsqb;&rsqb;
xref:nlohmann/basic_json-00/const_reference.adoc[const&lowbar;reference]
operator&lsqb;&rsqb;(xref:nlohmann/json_pointer-0a.adoc[nlohmann::json&lowbar;pointer&lt;BasicJsonType&gt;] const& ptr) const;
----

== Return Value

the type of an element const reference

== Parameters

[cols="1,4"]
|===
|Name|Description

| *ptr*
| The right operand
|===


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