Given a ragged list, e.g.
[[4, 7], [5, 3, [], [6, [2]]]]
Your challenge is to sort only the numbers in it. For example, with the above, the result would be
[[2, 3], [4, 5, [], [6, [7]]]]
The shape of the output should remain the same, only the numeric contents should change.
This is code-golf, shortest code wins!
All numbers will be unique positive integers. You may do input / output with strings.
Testcases
[2, [3, [1, []]]] -> [1, [2, [3, []]]]
[6, 5, [[9]], 7] -> [5, 6, [[7]], 9]
[12, [43, 51], [[23, 4], 9, [22, []]]] -> [4, [9, 12], [[22, 23], 43, [51, []]]]
[9, 4, 2] -> [2, 4, 9]