---
title: "Using spread syntax and destructuring assignment in Google Sheets .getValues() with Google Apps Script"
author: "Martin Hawksey"
date: 2022-04-04T10:00:53+00:00
modified: 2022-04-04T10:00:58+00:00
canonical_url: https://pulse.appsscript.info/p/2022/04/using-spread-syntax-and-destructuring-assignment-in-google-sheets-getvalues-with-google-apps-script/
markdown_url: https://pulse.appsscript.info/p/2022/04/using-spread-syntax-and-destructuring-assignment-in-google-sheets-getvalues-with-google-apps-script.md
categories:
  - "Intermediate"
  - "Sheets"
  - "Solutions"
  - "V8"
tags:
  - "tanaikech.github.io"
featured_image: https://pulse.appsscript.info/files/2022/04/fig1.png
description: "I've featured other coding patterns from Kanshi Tanaike and here is some other nice examples of how you can handle 2D arrays returned by ```.getValues()```, in particular, this post shows a nice way of getting non-adjacent columns in Google Sheets"
---

# Using spread syntax and destructuring assignment in Google Sheets .getValues() with Google Apps Script

![Using spread syntax and destructuring assignment in Google Sheets .getValues() with Google Apps Script](https://pulse.appsscript.info/files/2022/04/fig1.png)

> [https://tanaikech.github.io/2022/03/30/applicating-spread-syntax-and-destructuring-assignment-to-google-spreadsheet-with-google-apps-script/](https://tanaikech.github.io/2022/03/30/applicating-spread-syntax-and-destructuring-assignment-to-google-spreadsheet-with-google-apps-script/)
> In this report, I would like to introduce to apply the spread syntax and the destructuring assignment to Google Spreadsheet with Google Apps Script. … I have sometimes gotten the questions related to the spread syntax and the destructuring assignment. So, I thought that I would like to introduce in my blog.

We’ve featured other coding patterns from Kanshi Tanaike and here is some other nice examples of how you can handle 2D arrays returned by `.getValues()`, in particular, this post shows a nice way of getting non-adjacent columns in Google Sheets.

Source: [*Applicating Spread Syntax and Destructuring assignment to Google Spreadsheet with Google Apps Script***](https://tanaikech.github.io/2022/03/30/applicating-spread-syntax-and-destructuring-assignment-to-google-spreadsheet-with-google-apps-script/)

---

*Published by [Martin Hawksey](https://pulse.appsscript.info/p/author/admin/) on [Pulse](https://pulse.appsscript.info/). Original article: [https://pulse.appsscript.info/p/2022/04/using-spread-syntax-and-destructuring-assignment-in-google-sheets-getvalues-with-google-apps-script/](https://pulse.appsscript.info/p/2022/04/using-spread-syntax-and-destructuring-assignment-in-google-sheets-getvalues-with-google-apps-script/)*
