Task: Fix JSON Object Writing to File with fs.writeFileSync
Task: Fix JSON Object Writing to File with fs.writeFileSync: a task in Terminal-Lego-15k (Harbor dataset). When writing a JavaScript object to a JSON file using Node.js's fs.writeFileSync , the file ends up containing the string object Object instead of the actual JSON content. This is a common…
The task
When writing a JavaScript object to a JSON file using Node.js's `fs.writeFileSync`, the file ends up containing the string `[object Object]` instead of the actual JSON content. This is a common mistake that occurs when passing a JavaScript object directly to `fs.writeFileSync` without properly serializing it first.
Part of PrimeIntellect/Terminal-Lego-15k.