4 Matching Annotations
  1. Dec 2020
    1. var parsed = JSON.parse(myJSONData, function(k, v) { if (k === "name") this.key = v; else if (k === "children") this.value = v; else return v; });

      Interesting. Didn't realize you could use reviver to change keys as well as values. What is this here? Since nothing is returned in the first 2 cases, I assume it removes the original key for those cases...