Check out example codes for "kotlin save hashmap to SharedPreferences". It will help you in understanding the concepts better.

Code Example 1

val a= hashMapOf<Any,Any>( 1 to Exception(), 2 to Throwable(), Object() to 33)

Learn ReactJs, React Native from akashmittal.com