Go to the source code of this file.
|
JS_API JsOptionalValue | JsFindValue (const JsObject &object, const std::string &key, const JsOptionalValue &defaultValue=std::nullopt) |
| Returns the value associated with key in the given object .
|
|
◆ JsOptionalValue
typedef std::optional<JsValue> JsOptionalValue |
◆ JsFindValue()
JS_API JsOptionalValue JsFindValue |
( |
const JsObject & |
object, |
|
|
const std::string & |
key, |
|
|
const JsOptionalValue & |
defaultValue = std::nullopt |
|
) |
| |
Returns the value associated with key
in the given object
.
If no such key exists, and the supplied default is not supplied, this method returns an uninitialized optional JsValue. Otherwise, the defaultValue
is returned.