I am looking to transform an object into an array. The object I have is structured like this:
const data = {
t1: [ {"a": 1, "a1": 2}, {"b": 3, "b1": 4}, {"c": 5, "c1": 6} ],
t2: [ {"d": 2}, {"e": 2}, {"f": 2} ]
}
The desired output is an array containing all the objects within the arrays of t1 and t2 without any nesting:
[ {"a": 1, "a1": 2}, {"b": 3, "b1": 4}, {"c": 5, "c1": 6} , {"d": 2}, {"e": 2}, {"f": 2}]
To achieve this transformation, I can use the following code:
const join = data.t1.concat(data.t2)
My question is whether there is a similar function available in the Ramda
library that can accomplish this task?