Loading...
The Payload Flattener
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- junior, mid, senior
Problem
Our product catalog API returns deeply nested JSON, but the warehouse expects flat rows with no nesting. Write a function that takes a nested dictionary and produces a flat one where keys from different levels are joined with a separator. No libraries allowed.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.