Skip to content

Json to std::unordered_map #3689

Discussion options

You must be logged in to vote
auto j = json::parse(R"("{ "Staff List": { "Staff": ["NameHere" , 29 ] } }")");

You can iterate through it using https://json.nlohmann.me/api/basic_json/items/ and populate a std::unordered_map.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mPlauts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants