public static function sort(array $value): array
    {
        if (self::hash($value)) {
            ksort($value);
        }

        return collect($value)->map(function ($item) {
            return self::normalize($item);
        })->all();
    }
public static function sort(array $value): array
    {
        if (self::hash($value)) {
            ksort($value);
        }

        return collect($value)->map(function ($item) {
            return self::normalize($item);
        })->all();
    }
public static function sort ( array $ value ) : array { if ( self :: hash ( $ value ) ) { ksort ( $ value ) ; } return collect ( $ value ) -> map ( function ( $ item ) { return self :: normalize ( $ item ) ; } ) -> all ( ) ; }
Recursively sort a JSON hash or JSON list for comparison.

@param array $value
@return array
Recursively sort a JSON hash or JSON list for comparison .