I am working on the rails application I have the following array
["194K-001", "177K-STB", "17SH-LW9", "115L-T03"]
and i want to create it as follow
[["194K-001"], ["177K-STB"], ["17SH-LW9"], ["115L-T03"]]
Thanks
You can use zip without argument:
["194K-001", "177K-STB", "17SH-LW9", "115L-T03"].zip
# => [["194K-001"], ["177K-STB"], ["17SH-LW9"], ["115L-T03"]]