I could display the result of my pagination query (FaunaDB,FQL) in the console and it appears as a javascript object. Yet, I cannot access the properties of said object and even less can I convert it to an array using the spread operator. How could I do that?
I am aware there exists a pagination helper but could not make it work, as explained above. Here is the latest code I am trying:
var array=[]
qu(q.Map(
q.Paginate(q.Match(q.Index('FeesByIndex'))),
q.Lambda(x => q.Get(x))
)).then(res => { console.log(res); array=[...res] })//the log really looks like a js object and res is said to be one
It says type object is not an array type. Also, property data is said not to exist on res, although it clearly does in the console