documentMap.toArray().map((msg) => { // msg[0] is key // msg[1] is element at key console.log(msg[0],msg[1]) return }