title: How to change values in jsoncpp object
body: <p>I am trying to change values in my jsoncpp object. I found multiple solutions for jsoncpp array, but so far none for jsoncpp object. What I am trying to do is:</p>
  
  <pre><code>void saveAllValues(FIELD **field, Json::Value node, unsigned int* i){
  
      for(Json::ValueIterator it = node.begin(); it != node.end(); it++) {
          if ((*it).isObject() || (*it).isArray()) saveAllValues(field, *it, i);
          else {
              std::string value = field_buffer(field[*i], 0); //get value from ncurses field
              *it = Json::Value(value);
              (*i)++;
          }
      }
  }
  </code></pre>
  
  <p>So far this code does nothing. How can I change value of current node?</p>