In other words; how can I convert
// an array of length >= 3
let myArray = returnOfSomeParametricFunction(); // assuming repeating rhs removes dryness
let myObj = { staticKeyName: myArray[1], anotherStaticKeyName: myArray[2] };
to a single liner. Perhaps something like:
let myObj = returnOfSomeParametricFunction().reduce(arr=> { staticKeyName: arr[1], anotherStaticKeyName: arr[2] };