💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## fromPairs + [link](./fromPairs "Link to this entry.") + [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L5995 "View in source.") + [npm](https://www.npmjs.com/package/lodash.frompairs "See the npm package.") ``` _.fromPairs(pairs) ``` 反向版 `_.toPairs`,这个方法返回一个由键值对构成的对象。 ### 参数 1. pairs (Array) 键值对 ### 返回值 (Object) 返回一个新对象 ### 示例 ``` _.fromPairs([['fred', 30], ['barney', 40]]); // => { 'fred': 30, 'barney': 40 } ```