parent
25aab7ee41
commit
27fe50dc92
1 changed files with 5 additions and 0 deletions
|
@ -544,6 +544,11 @@ for (auto& [key, value] : o.items()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// find an entry
|
// find an entry
|
||||||
|
if (o.contains("foo")) {
|
||||||
|
// there is an entry with key "foo"
|
||||||
|
}
|
||||||
|
|
||||||
|
// or via find and an iterator
|
||||||
if (o.find("foo") != o.end()) {
|
if (o.find("foo") != o.end()) {
|
||||||
// there is an entry with key "foo"
|
// there is an entry with key "foo"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue