I am relatively new to RethinkDB and I am working on a system that stores data as arrays of arrays, as shown below.
[
{
symbol:"BTCUSDT",
"5m":
[
[
1654202400000,
30282.1,
30330.95,
30273.46,
30323.22,
91.66759
],
[
1654202700000,
30323.22,
30323.23,
30278.84,
30278.85,
259.51072
],
...
]
}
]
Right now I have written a query that gets me the data but I want to be able to filter this data the more without fetching everything and handling it on the javascript side. Here is my query
r.db("candleSticks").table("pair").filter({symbol:"BTCUSDT"}).getField("5m")
So I am left with something like this
[
1654202400000,
30282.1,
30330.95,
30273.46,
30323.22,
91.66759
],
[
1654202700000,
30323.22,
30323.23,
30278.84,
30278.85,
259.51072
],
[
1654203000000,
30278.84,
30298.66,
30274.94,
30277.7,
65.74652
],
]
But I would like to filter by their first index. Like
data.filter(line => line[0] >= 1654202700000)
I don't know if it is possible to achieve such in RethinkQL. Thank you