My application has a large array of objects, which I stringify and save them to the disk. Unfortunately, when the objects in the array are manipulated, and sometimes replac
You can pass a sorted array of the property names as the second argument of JSON.stringify():
JSON.stringify()
JSON.stringify(obj, Object.keys(obj).sort())