-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Erase by integer index #1018
Copy link
Copy link
Closed
Labels
kind: questionsolution: proposed fixa fix for the issue has been proposed and waits for confirmationa fix for the issue has been proposed and waits for confirmation
Description
Activity
Metadata
Metadata
Assignees
Labels
kind: questionsolution: proposed fixa fix for the issue has been proposed and waits for confirmationa fix for the issue has been proposed and waits for confirmation
I have this object.
json obj = { {"Foo", 1}, {"Bar", 2} };In some cases I have only integer index of
Foo(i.e.0) orBar(i.e.1), not a key like "Foo" or "Bar". And I'm need toerase"Bar" using only integer index. If I'm trying to erase "Bar" with using integer index, I'm getting an exception.So, how I can (if it's possible) erase "Bar" using integer index? Or I need to use cycle like this
for (auto it : obj)to find associative key by integer in first?