This is a function you might like to use with get, which dynamically looks up values in an object given a string path. Using the two together you could do something like flatten a deep object.
import*as _ from'radashi'
_.objectify(
_.keys(ra),
key=> key,
key=> _.get(ra, key),
)
// => {
// 'name': 'ra'
// 'power': 100
// 'friend.name': 'loki'
// 'friend.power': 80
// 'enemies.0.name': 'hathor'
// 'enemies.0.power': 12
// }
As of v10.5.0+ you can get this behavior via the crush function