Replies: 3 comments
-
Can you share an example? |
Beta Was this translation helpful? Give feedback.
0 replies
-
solved it by calling |
Beta Was this translation helpful? Give feedback.
0 replies
-
static void delete_keys(nlohmann::json& json_obj){
nlohmann::json::iterator it {json_obj.begin()};
while(it != json_obj.end()){
if(REMOVABLE_KEYS.contains(it.key()))
it = json_obj.erase(it); //instead of json_obj.erase(it.key());
else
it++;
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I tried to follow an approach similar to the one in this answer but it seems like the
erase
method doesn't actually return anything.Beta Was this translation helpful? Give feedback.
All reactions