What’s the command to make [ [1,2], [3,4] ] become [1,2,3,4] ?
(asked on behalf of someone else)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
.flatmessage is what you’re after:[[1,2],[3,4]].flatthere’s also
.flattenwhich gives the same result in this case (but.flattenonly flattens one “level” whereas.flatwill flatten all the way down to a fully-flat array)