Hi guys, I have a question. I am working with a json file for the first time, and I am trying to store the contents of it into a vector pass it to a sorting function. However, I can't seem to print the elements of the vector which leads to be believe that i'm not successful at sorting the elements in it to begin with. He is my code. if anyone can look over it and tell me what I am doing wrong it would be a big help. thanks!
std::vector<int>data; // This is not filled
std::vector<int>::iterator itr;
for(std::vector<std::string>::iterator itr = keys.begin(); itr != keys.end(); ++itr) {
std::vector<int>data = jsonObject[*itr].get<std::vector<int>>(); // This 'data' is not visible outside the loop
std::cout<<itr.value();
}