bashor
fun <K, V> Map<K, V>.toJSON(): dynamic { val result = js("({})") for ((k, v) in this) { result[k.toString()] = v } return result }