Feb 4, 2019 06:22 AM
(This post was last modified: Feb 4, 2019 06:24 AM by int main().)
Code
json object = bsoncxx::to_json(*maybe_result);
// call find
auto it_two = object.find("username");
std::cout << object << std::endl;
std::cout << std::boolalpha;
std::cout << "username was found: " << (it_two != object.end()) << '\n';I'm trying to find the value of the index called "username" so i only want the value it holds, which should be admin. But the problem is i cant parse it, it always returns false
how it looks:
http://prntscr.com/mgfweq
response: http://prntscr.com/mgfwj8
using https://github.com/nlohmann/json


