Unexpected `null` values when decoding JSON arrays in Node.js with `JSON.parse()`
I'm working on a personal project and I've searched everywhere and can't find a clear answer... I'm testing a new approach and I'm having trouble with decoding a JSON string that contains arrays with `null` values using Node.js. I'm using version 14.x of Node.js and trying to parse a JSON response from an API that returns the following string: ```json {"data":[1,2,null,4,5,null]} ``` When I parse this string with `JSON.parse()`, I expect to get an array that has `null` values in the same positions as in the JSON string. However, my code seems to skip the `null` values and I end up with an array that only contains the non-null numbers. Here's the code I'm using: ```javascript const jsonString = '{"data":[1,2,null,4,5,null]}'; const parsedData = JSON.parse(jsonString); console.log(parsedData.data); ``` The output I get is: ``` [ 1, 2, 4, 5 ] ``` Instead of getting `[ 1, 2, null, 4, 5, null ]`, I get an array that seems to have omitted the `null` values. I've checked the original JSON string and it is indeed correct. I've also tried using different methods to traverse the parsed object, but they all yield the same result. Is there a configuration I'm missing or a specific way I should be handling `null` values in this version of Node.js? Any insights would be greatly appreciated! This is happening in both development and production on Windows 11. Is there a simpler solution I'm overlooking? This is happening in both development and production on Windows 10. For context: I'm using Javascript on Linux. I'm using Javascript 3.11 in this project. I'm open to any suggestions.