I have a table with about 2m records with following structure:
{
"fields": "values",
"transactions": [
{
'from': '...',
'value': '...'
}
]
}
Now I want to separate the data in transaction field to be separate records in another table. Is there some native way to do it in rethinkdb?
I was able to do it using concatMap:
r.table('transactions').insert(
r.table('records').concatMap(function (doc){return doc('transactions')})
)