Translate all items in a list to new array of items.
The given mapping function will be called for each element in the list:
up.util.map(['apple', 'cherry'], (str) => str.length) // result: [5, 6]
You can also pass a property name as a string, which will be collected from each item in the list:
up.util.map(['apple', 'cherry'], 'length') // result: [5, 6]
A function that will be called with each element and (optional) iteration index.
You can also pass a property name as a string, which will be collected from each item in the list.
A new array containing the result of each function call.