Add solution to flatten dictionary