I have two web services generating JSON output. Both services are using different technologies but are supposed to generate the exact same output.
I want to check if this output is exactly the same in the browser environment. I would really prefer to simple compare them as string, but the JSON output is not sorted.
I can convert JSON string to objects and then iterate over their keys to check the equivalence but that is basically a n^2 algorithm.
I was wondering if there is any quicker or better way. Something that browser environment already provides.