diff options
Diffstat (limited to 'src/univalue/univalue.cpp')
-rw-r--r-- | src/univalue/univalue.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/univalue/univalue.cpp b/src/univalue/univalue.cpp index 994d93113a..e8fc513433 100644 --- a/src/univalue/univalue.cpp +++ b/src/univalue/univalue.cpp @@ -213,3 +213,15 @@ const char *uvTypeName(UniValue::VType t) return NULL; } +const UniValue& find_value( const UniValue& obj, const std::string& name) +{ + for (unsigned int i = 0; i < obj.keys.size(); i++) + { + if( obj.keys[i] == name ) + { + return obj.values[i]; + } + } + + return NullUniValue; +}
\ No newline at end of file |