Available question text
Recursively traverse the JSON-derived object/array and remove any keys or array elements whose values are falsy, returning the same structure with falsy-valued properties/elements deleted. Arrays should be treated as keyed objects (i.e., filter out falsy elements) and the compaction applies to all nested objects/arrays.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2705. Compact Object
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source