This is a classic "XY Problem." (Google It.™) You have a problem. But you've already decided now that you need to solve that problem by "Map," which of course requires a "key" which of course can't be "an array" until you (the rabbit-hole journey begins here ...) "concoct a way to do that," etc. The problem being that "the rabbit-hole problem" now becomes the focus of your attention instead of your original problem. "Therefore, STEP BACK!" "THERE'S MORE THAN ONE WAY TO DO IT!™"