Question:
{ "foo": "bar", "bar": "baz", "baz" : { "nestedKey": "foo" } }
In order to sign this request using the Hmac512 algorithm, I must first stringify the object.
I am concerned that if the key order is not preserved, the generated signature on the server and client side may differ.
To address this concern, my solution is to alphabetically sort the keys of the object (including nested keys).
How can I implement this sorting process?