title: how to completely remove json array element (using jsoncpp)
body: <p>I am using jsoncpp, I have a set of data as below, I want to search some node and remove the array element, some how when I remove, it become {}, is that possible to completely remove with {}?</p>
  
  <p>Data before remove:</p>
  
  <pre><code>{
      "any" : [
      {
          "any_id" : "a1",
          "infos" : [
          {
              "info_id" : "i1",
              "path" : "",
              "version" : "1.0"
          }
          ]
      },
      {
          "any_id" : "a2",
          "infos" : [
          {
              "info_id" : "i1",
              "path" : "",
              "version" : "1.0"
          },
          {
              "info_id" : "i2",
              "path" : "D:\\",
              "version" : "1.0"
          },
          {
              "info_id" : "i3",
              "path" : "",
              "version" : "1.0"
          },
          {
              "info_id" : "i4",
              "path" : "D:\\",
              "version" : "1.0"
          }
          ]
      },
      {
          "any_id" : "a3",
          "infos" : [
          {
              "info_id" : "i4",
              "path" : "",
              "version" : "1.0"
          }
          ]
      }
      ]
  }
  </code></pre>
  
  <p>Data after remove:</p>
  
  <pre><code>{
      "any" : [
      {
          "any_id" : "a1",
          "infos" : [
          {
              "info_id" : "i1",
              "path" : "",
              "version" : "1.0"
          }
          ]
      },
      {
          "any_id" : "a2",
          "infos" : [
          {
              "info_id" : "i1",
              "path" : "",
              "version" : "1.0"
          },
          {
          },
          {
              "info_id" : "i3",
              "path" : "",
              "version" : "1.0"
          },
          {
          }
          ]
      },
      {
          "any_id" : "a3",
          "infos" : [
          {
              "info_id" : "i4",
              "path" : "",
              "version" : "1.0"
          }
          ]
      }
      ]
  }
  </code></pre>
  
  <p>in C++, I have the following code, look for any_id and path to remove array element:</p>
  
  <pre><code>for (Json::ValueIterator &amp;itr_any = data["any"].begin();
          itr_any != data["any"].end(); ++itr_any)
      {
          if (0 == _stricmp((*itr_any)["any_id"].asString().c_str(), "a2"))
          {
              for (Json::ValueIterator &amp;itr_res = (*itr_any)["infos"].begin();
                  itr_res != (*itr_any)["infos"].end(); ++itr_res)
              {
                  if (0 == _stricmp((*itr_res)["path"].asString().c_str(), "D:\\"))
                  {
                      (*itr_res).clear();
                  }
              }
          }
      }
  </code></pre>