# \_.invokeMap(collection, path, args )

URL: https://caijiao.org/lodash/docs/Collection/_.invokeMap
Source: docs/lodash/docs/Collection/_.invokeMap.md
Description: _.invokeMap(collection, path, [args]) 用于调用集合中每个元素的指定方法，并返回结果数组。

`_.invokeMap(collection, path, [args])` 用于调用集合中每个元素的指定方法，并返回结果数组。

- `collection`：要处理的集合，可以是数组、对象或类数组对象。
- `path`：要调用的方法名称，可以是字符串或者一个包含方法名称的数组。
- `args`（可选）：要传递给方法的参数。

应用举例：

```javascript
// 原始集合
const collection = ["hello", "world"];

// 调用每个字符串元素的 toUpperCase 方法
const result = _.invokeMap(collection, "toUpperCase");

console.log(result);
// 输出：['HELLO', 'WORLD']
```

在这个例子中，`_.invokeMap` 方法调用了原始集合中每个字符串元素的 `toUpperCase` 方法，并返回了结果数组 `['HELLO', 'WORLD']`。
