Skip to content

Instantly share code, notes, and snippets.

@jniemann66
Created November 3, 2016 00:52
Show Gist options
  • Save jniemann66/3bd0e9e5cdeaf77e1b68d105c76ff33b to your computer and use it in GitHub Desktop.
Save jniemann66/3bd0e9e5cdeaf77e1b68d105c76ff33b to your computer and use it in GitHub Desktop.
Merging array of arrays into a single array
// merge array of arrays into a single array
var data = [
['a','b','c'],
['d','e','f'],
['g','h','i'],
]; // array of arrays
// merge results into a single array
var combinedData = [].concat.apply([], data); // ['a','b','c','d' ... 'i']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment