My personal favourite is this gist:
function transpose(a)
{
return Object.keys(a[0]).map(function (c) { return a.map(function (r) { return r[c]; }); });
}
More Related Contents:
- Google Spreadsheet Script – How to Transpose / Rotate Multi-dimensional Array?
- Long processing time likely due to getValue and cell inserts
- Why do we use SpreadsheetApp.flush();?
- Convert column index into corresponding column letter
- Merging or Combining two onEdit trigger functions
- How to poll a Google Doc from an add-on
- How to read the correct time/duration values from Google Spreadsheet
- How to copy a row from one google spreadsheet to another google spreadsheet using google apps script?
- Emailing Google Sheet range (with or without formatting) as a HTML table in a Gmail message
- How much faster are arrays than accessing Google Sheets cells within Google Scripts?
- Google Apps Script toast messages don’t appear for anonymous editors
- Synchronize independent spreadsheet rows, filled by IMPORTRANGE()
- How to speed up the search data in sheet
- How to Autofill last row with formula, when data is received from IFTTT on the last row?
- Scraping data to google sheets from a website that uses JavaScript
- How to allow access for importrange function via apps script?
- How to fix ‘TypeError: Cannot call method “getRange” of null’ in Google Apps Script
- How to run certain scripts under the authority of a specific user?
- Set anonymous/dynamic functions to Menu
- Generate PDF of only one sheet of my spreadsheet
- To exceed the ImportXML limit on Google Spreadsheet
- How do I replace text in a spreadsheet with Google Apps Script?
- How to make onEdit() trigger function apply to multiple sheets
- Google apps script: how to persist data in spreadsheet between different function calls?
- Google Script: Play Sound when a specific cell change the Value
- Failure of calling Google App Script onEdit function many times in a second
- Add timestamp to named column in Google Spreadsheet onEdit script
- What are some use cases for SpreadsheetApp.flush()?
- google script detect empty cell after edit or delete
- Converting Google spreadsheet date into a JS Date object?