mrdocs::js::Value::operator[]
Subscript operators
Synopses
Declared in <mrdocs/Engines/JavaScript/Value.hpp>
Return the element for an array index.
Value
operator[](std::size_t index) const;
Return the element for a property name.
Value
operator[](std::string_view key) const;
Return Value
-
The element for the given index, or undefined if out of bounds / not an array.
-
The element for the given key, or undefined if missing / not an object.
Parameters
Name |
Description |
index |
Zero‐based array index to fetch when the value is an array. |
key |
Property name to fetch from the current object. |
Created with MrDocs