3
3
39ste2019-12-05 16:33:17
Google Apps Script
39ste, 2019-12-05 16:33:17

How to parse a google spreadsheet into an object?

5de9066b87734899241044.png
There is a table for generating a complex object with different nesting. The number of columns can be dynamic (2, 3.4, etc.). The last column is the final value of the property.
How to properly parse a table so that the result (in this case) is an object of the form:

obj1: {
        prop1: val1
    },
obj27: {
        prop2: val2,
        prop3: val3,
        obj45: {
            prop4: val4,
            prop5: val5
        },
        obj6: {
            prop6: val6
        },
        prop7: val7
 }

I did not find a solution for such issues on the Internet. Prompt the correct universal writing algorithm. Or maybe there are ready-made scripts somewhere.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Noir, 2019-12-05
@PolarBearGG

google sheets to json

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question