Creates an object with the same keys as object and values generated by running each own enumerable string keyed property of object thru iteratee. The iteratee is invoked with three arguments: (value, key, object).
object
iteratee
The object to iterate over.
The function invoked per iteration.
Returns the new mapped object.
2.4.0
mapKeys
const users = { 'fred': { 'user': 'fred', 'age': 40 }, 'pebbles': { 'user': 'pebbles', 'age': 1 }}mapValue(users, ({ age }) => age)// => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) Copy
const users = { 'fred': { 'user': 'fred', 'age': 40 }, 'pebbles': { 'user': 'pebbles', 'age': 1 }}mapValue(users, ({ age }) => age)// => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
Creates an object with the same keys as
object
and values generated by running each own enumerable string keyed property ofobject
thruiteratee
. The iteratee is invoked with three arguments: (value, key, object).