#K43327. Flatten Nested Dictionary
Flatten Nested Dictionary
Flatten Nested Dictionary
Given a JSON object representing a dictionary, possibly containing nested dictionaries, your task is to flatten it. The flattening process involves concatenating keys from the nested dictionaries using a dot ('.') as a separator. For example, a nested key {"a": {"b": 1}} should be flattened to {"a.b": 1}. This problem tests your ability to recursively process data structures.
Note: Non-dictionary values such as numbers, strings, or arrays should remain unchanged.
inputFormat
The input is provided as a single line from standard input (stdin). It is a valid JSON object representing a dictionary which may include nested dictionaries.
outputFormat
Output the flattened dictionary as a JSON object in a single line to standard output (stdout). Nested keys are concatenated with a dot ('.').
## sample{"a": 1, "b": 2}
{"a":1,"b":2}