Problem 2823 · Medium

Deep Object Filter

Walk a nested JSON object or array and keep only the values a predicate accepts, deleting any array or object left empty along the way. Return undefined when nothing survives.

Open the interactive visualisation