Hello,
I'm starting to use Excel Office Script on Excel Online and I have a problem with the creation of an array to make a unique setValues. My function is inside an async function.
1°) I call a jotForm API and gets an object in return
2°) I need to iterate through the object and gets some multiple answers
My problem is in the iteration : I'm getting in return an array like this
["Question1-element1","Question1-element2,"Question1-element3","Question2-element1","Question2-element2","Question1-element3"]
But because of setValues and how to write answers to each rows, I need to return an array like this :
[["Question1-element1","Question1-element2,"Question1-element3"],["Question2-element1","Question2-element2","Question1-element3"]]
There each questions are divided and will be written on a different row.
Here is my code :
What I get from that is all the answers in one line.
But I can't seem to figure out how to push each answer in an array structure like : [[],[],[];[]]. Instead, I get the array structure [,,,,]. I need it because of the setValues in the end :
Any chance someone could have an easy fix for that ?
Thank you in advance,
Cedric
Bookmarks