Recursively sort the keys of data, optionally using a custom compareFunction.
data
compareFunction
getSortedObject({ b: 2, a: 1 }); // { a: 1, b: 2 } Copy
getSortedObject({ b: 2, a: 1 }); // { a: 1, b: 2 }
Optional
Recursively sort the keys of
data, optionally using a customcompareFunction.Example