Bagas Teguh imani Posted on Jun 18, 2020 Help me with this JS code please.. #javascript #discuss #array #loop https://stackoverflow.com/q/62450635/13769179 Top comments (1) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Collapse Expand Hemant Joshi Hemant Joshi Hemant Joshi Follow Your Friendly Neighbourhood Developer. Location Nainital, India Education Birla Institue Of Apllied Sciences; Work Learning... Joined Mar 31, 2020 • Jun 18 '20 • Edited on Jun 18 • Edited Dropdown menu Copy link Hide Destructuring could help you better and mapping the input to output let output = input.map(([ID, Name, Born_Place, Birthday, Hobby ]) => ({ID, Name, ["Born Place"]:Born_Place, Birthday, Hobby})) console.log(output); Code of Conduct • Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse
Top comments (1)
Destructuring could help you better and mapping the input to output