You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works (as suggested by [Coke]): define a sub suitable for the key types expected:
sub my-sort($a, $b) { $a.key cmp $b.key }
my $jstr = to-json %h, :pretty, :sorted-keys(&my-sort);
If multiple key types are expected, then the sub should use elsif or when to define what the user wants when a key pair is not directly comparable. For example, I used this sub for mixed Str and Int types:
TO BE COMPLETE A BIT LATER (when I get back to a real computer)
No description provided.
The text was updated successfully, but these errors were encountered: