[#BloombergLP-bdljsn-Json-operator_subs-0f] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/Json.adoc[Json]::operator[] :relfileprefix: ../../../ :mrdocs: Subscript operators == Synopses Declared in `<bdljsn_json.h>` Return a modifiable reference to the held array element at `index`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_subs-03.adoc[operator[]](std::size_t index); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_subs-03.adoc[_» more..._]# Return a non‐modifiable reference to the held array element at `index`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json] const& xref:BloombergLP/bdljsn/Json/operator_subs-04.adoc[operator[]](std::size_t index) const; ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_subs-04.adoc[_» more..._]# Return a modifiable reference to the held object's member for `key`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_subs-07.adoc[operator[]](std::string_view const& key); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_subs-07.adoc[_» more..._]# Return a non‐modifiable reference to the held object's member for `key`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json] const& xref:BloombergLP/bdljsn/Json/operator_subs-0b.adoc[operator[]](std::string_view const& key) const; ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_subs-0b.adoc[_» more..._]# == Return Value * modifiable reference to the held array element at `index` * a non‐modifiable reference to the element at the specified position * modifiable reference to the held object's member for `key` == Parameters [cols="1,4"] |=== | Name| Description | *index* | zero‐based element position | *key* | UTF‐8 member name |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#