uce/site/doc/pages/2_DValue_key.txt
2026-06-15 21:42:50 +00:00

20 lines
444 B
Plaintext

:sig
DValue* DValue::key(String s)
const DValue* DValue::key(String s) const
:params
s : child key to find
return value : pointer to existing child, or 0
:see
0_DValue
2_DValue_has
2_DValue_get_or_create
:content
Looks up one child without creating it. The non-const overload forwards through references; both overloads return `0` for scalars or missing keys.
```cpp
if(const DValue* user = payload.key("user")) print(user->to_json());
```