Write a function to recursively flatten a deeply nested dictionary or JSON object into a single-level dictionary.