Postgresql Row To Array Javascript Mdn Map Function