A simple utility to sort a JSON object based on keys