map works on both arrays and objects now