Add a json_object_sort function to sort the entries of an object based on the order in a prototype object