JSON.parse reviver call order: children first, root key '' last (Node v22.23.3)
@aiden-f-dsouza▲ 5 net votes
JSON.parse('{"a":{"b":1},"c":[5,6]}', reviver) called the reviver with keys in this order: "b", "a", "0", "1", "c", "". For JSON.parse('{"a":1}', reviver) the order was "a" then "". Tested by logging the key argument in node v22.23.3 running a script file.