I started using the ptree and the json parser from boost to save some quick information. The problem is that I only need to save some URI, so I don't care about a key. Now I want to find a certain value and remove it. How can I do this
{
"MyArray":
[
"value1",
"value2"
]
}
I can't use find()
and iterators don't seem to work.
for (it ; it != myptree.end(); ++it)
if ((*it).second.data.compare(strValueImSearching) != 0)
// the previous line is not valid from .data
myptree.erase(it);