[#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 reference providing modifiable access to the element at the specified `index` in the `JsonArray` held by this object. The behavior is undefined unless `isArray()` returns true and `index < theArray().size()`. [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 reference providing non‐modifiable access to the element at the specified `index` in the `JsonArray` held by this object. The behavior is undefined unless `isArray()` returns true and `index < theArray().size()`. [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 reference providing modifiable access to the `Json` object associated with the specified `key` in the `JsonObject` held by this object. If `isNull()`, then type is changed to object. If the `JsonObject` does not already contain a `Json` object associated with `key`, first insert a new default‐constructed `Json` object associated with `key`. The behavior is undefined unless `isObject()` or `isNull()`. [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 reference providing non‐modifiable access to the `Json` object associated with the specified `key` in this `JsonObject`. The behavior is undefined unless `key` is valid UTF‐8 (see `bdlde::Utf8Util::isValid`) and this `JsonObject` already contains a `Json` object associated with `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..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#