I am new at coding on Google Scripts, and I am trying to understand how to move the data I am receiving from a JSON formatted file into a spreadsheet.
I am attempting to pull financial data, but if I could process the simple example below it would help me know how to code for all other JSON formats I am encountering.
I know the basics.
I can link the spreadsheet and I can parse it out using the two commands below.
It is the step after that where I push the data to a spreadsheet I am having difficulty with.
var responseAPI = UrlFetchApp.fetch(url);
var parcedData = JSON.parse(responseAPI.getContentText());
I would guess I would take the sample file below and put the Months in column A.
The Survived Flag in column B.
The bills/other tag in column C.
The expense description in column D, and the expense amount in column E.
{"JANUARY": {
"bills":[
["Electric",122.46],
["Credit",155.44],
["Mortgage",440.05]],
"other":[
["Food",188.33],
["Clothes",89.28]],
"Survived":"Y"},
"FEBRUARY":{
"bills":[
["Electric",129.46],
["Credit",155.44],
["Mortgage",440.05],
["Car",298.77],
"other":[
["Food",218.33],
["Clothes",49.28]],
"Survived":"N"},
"MARCH":{
"bills":[
["Electric",119.46],
["Credit",155.44],
["Mortgage",440.05]],
"other":[
["Food",218.33],
["Clothes",49.28],
["Insurance",250.98],
"Survived":"Y"}}
Yes, I would like some help with the script, but also, if you could provide an explanation of what you are doing and how it works that would be great so I can walk myself through it next time.
Thanks!
Colten