Hi,
I have a JS query which returns results from the Tempo API in this structure:
Each element of data (e.g. data[0] ) represents a user/team member. And the data[i].results are the timelogs for a given time period.
I am trying to write another query to extract just results[] from data[i].results[j] to populate a table (and later save to DB)
I've tried a basic JS loop, but data is empty [] after successful running:
let obj = getTempoTimeLogs.data
let result = [];
for (let i = 0; i< obj.lengthl; i++){
console.log(obj.length)
result.push([obj[i].results])
}
return (result)
Can anyone guide me on how to achieve this?
Thanks in advance!
Nick