次のようなjsonがあります
[{
    "name": "abc",
    "Path": "i.abc",
    "count": 5347,
    "subFolders": []
},
{
    "name": "cde",
    "Path": "i.cde",
    "count": 0,
    "subFolders": [{
        "name": "efg",
        "Path": "",
        "count": 0,
        "subFolders": []
    },
    {
        "name": "hij",
        "Path": "i.hij",
        "count": 1,
        "subFolders": []
    }]
}]
「パス」(一意の)値に基づいて「カウント」値を変更したい。たとえば、そのようにパス「i.hij」のカウントを2に変更したい。以下は私が試したコードです。
var json = "above json";
  for (i=0; i < json.length; i++) {
      this.updateJson(json[i], path, count);
  }
  updateJson: function(json, path, count) {
    if (json.path == path) {
        json.count = count;
        return json;
    } 
    if (json.subFolders != null && json.subFolders.length > 0) {
      for(j=0; j < json.subFolders.length; j++) {
          this.updateJson(json.subFolders[j], path, count);
      }
    }
  }
変更された値でjson全体を取得するにはどうすればよいですか?