ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[all方法](all%E6%96%B9%E6%B3%95.md) [chuck方法:拆分成新集合](chuck%E6%96%B9%E6%B3%95%EF%BC%9A%E6%8B%86%E5%88%86%E6%88%90%E6%96%B0%E9%9B%86%E5%90%88.md) [combine方法:将一个数组作为键另一个数组作为值组合新数组](combine%E6%96%B9%E6%B3%95%EF%BC%9A%E5%B0%86%E4%B8%80%E4%B8%AA%E6%95%B0%E7%BB%84%E4%BD%9C%E4%B8%BA%E9%94%AE%E5%8F%A6%E4%B8%80%E4%B8%AA%E6%95%B0%E7%BB%84%E4%BD%9C%E4%B8%BA%E5%80%BC%E7%BB%84%E5%90%88%E6%96%B0%E6%95%B0%E7%BB%84.md) [collapse方法:合并成新集合](collapse%E6%96%B9%E6%B3%95%EF%BC%9A%E5%90%88%E5%B9%B6%E6%88%90%E6%96%B0%E9%9B%86%E5%90%88.md) [flatten方法 将多维集合转为一维](flatten%E6%96%B9%E6%B3%95%E5%B0%86%E5%A4%9A%E7%BB%B4%E9%9B%86%E5%90%88%E8%BD%AC%E4%B8%BA%E4%B8%80%E7%BB%B4.md) [flip方法 将集合中的键和对应的数值进行互换](flip%E6%96%B9%E6%B3%95%E5%B0%86%E9%9B%86%E5%90%88%E4%B8%AD%E7%9A%84%E9%94%AE%E5%92%8C%E5%AF%B9%E5%BA%94%E7%9A%84%E6%95%B0%E5%80%BC%E8%BF%9B%E8%A1%8C%E4%BA%92%E6%8D%A2.md) [forget方法 通过给定的键来移除掉集合中对应的内容](forget%E6%96%B9%E6%B3%95%E9%80%9A%E8%BF%87%E7%BB%99%E5%AE%9A%E7%9A%84%E9%94%AE%E6%9D%A5%E7%A7%BB%E9%99%A4%E6%8E%89%E9%9B%86%E5%90%88%E4%B8%AD%E5%AF%B9%E5%BA%94%E7%9A%84%E5%86%85%E5%AE%B9.md) [forPage方法 分页展示数据](forPage%E6%96%B9%E6%B3%95%E5%88%86%E9%A1%B5%E5%B1%95%E7%A4%BA%E6%95%B0%E6%8D%AE.md) [groupBy方法 按某个元素的键的值进行分组](groupBy%E6%96%B9%E6%B3%95%E6%8C%89%E6%9F%90%E4%B8%AA%E5%85%83%E7%B4%A0%E7%9A%84%E9%94%AE%E7%9A%84%E5%80%BC%E8%BF%9B%E8%A1%8C%E5%88%86%E7%BB%84.md) [keyBy方法 用指定某个键的值作为新集合的键](keyBy%E6%96%B9%E6%B3%95%E7%94%A8%E6%8C%87%E5%AE%9A%E6%9F%90%E4%B8%AA%E9%94%AE%E7%9A%84%E5%80%BC%E4%BD%9C%E4%B8%BA%E6%96%B0%E9%9B%86%E5%90%88%E7%9A%84%E9%94%AE.md) [implode方法 合并某个键的值](implode%E6%96%B9%E6%B3%95%E5%90%88%E5%B9%B6%E6%9F%90%E4%B8%AA%E9%94%AE%E7%9A%84%E5%80%BC.md) [keys方法 返回集合的所有键](keys%E6%96%B9%E6%B3%95%E8%BF%94%E5%9B%9E%E9%9B%86%E5%90%88%E7%9A%84%E6%89%80%E6%9C%89%E9%94%AE.md) [merge方法 将给定数组或集合合并到原集合](merge%E6%96%B9%E6%B3%95%E5%B0%86%E7%BB%99%E5%AE%9A%E6%95%B0%E7%BB%84%E6%88%96%E9%9B%86%E5%90%88%E5%90%88%E5%B9%B6%E5%88%B0%E5%8E%9F%E9%9B%86%E5%90%88.md) [nth方法 创建由每隔n个元素组成一个新的集合](nth%E6%96%B9%E6%B3%95%E5%88%9B%E5%BB%BA%E7%94%B1%E6%AF%8F%E9%9A%94n%E4%B8%AA%E5%85%83%E7%B4%A0%E7%BB%84%E6%88%90%E4%B8%80%E4%B8%AA%E6%96%B0%E7%9A%84%E9%9B%86%E5%90%88.md) [partition方法 可以和 PHP 中的 list() 方法结合使用,来分开通过指定条件的元素以及那些不通过指定条件的元素](partition%E6%96%B9%E6%B3%95%E5%8F%AF%E4%BB%A5%E5%92%8CPHP%E4%B8%AD%E7%9A%84list%E6%96%B9%E6%B3%95%E7%BB%93%E5%90%88%E4%BD%BF%E7%94%A8%EF%BC%8C%E6%9D%A5%E5%88%86%E5%BC%80%E9%80%9A%E8%BF%87%E6%8C%87%E5%AE%9A%E6%9D%A1%E4%BB%B6%E7%9A%84%E5%85%83%E7%B4%A0%E4%BB%A5%E5%8F%8A%E9%82%A3%E4%BA%9B%E4%B8%8D%E9%80%9A%E8%BF%87%E6%8C%87%E5%AE%9A%E6%9D%A1%E4%BB%B6%E7%9A%84%E5%85%83%E7%B4%A0.md) [pluck方法 获取集合中给定键对应的所有值](pluck%E6%96%B9%E6%B3%95%E8%8E%B7%E5%8F%96%E9%9B%86%E5%90%88%E4%B8%AD%E7%BB%99%E5%AE%9A%E9%94%AE%E5%AF%B9%E5%BA%94%E7%9A%84%E6%89%80%E6%9C%89%E5%80%BC.md) [random方法 从集合中返回一个随机项](random%E6%96%B9%E6%B3%95%E4%BB%8E%E9%9B%86%E5%90%88%E4%B8%AD%E8%BF%94%E5%9B%9E%E4%B8%80%E4%B8%AA%E9%9A%8F%E6%9C%BA%E9%A1%B9.md) [reduce方法 将每次迭代的结果传递给下一次迭代直到集合减少为单个值](reduce%E6%96%B9%E6%B3%95%E5%B0%86%E6%AF%8F%E6%AC%A1%E8%BF%AD%E4%BB%A3%E7%9A%84%E7%BB%93%E6%9E%9C%E4%BC%A0%E9%80%92%E7%BB%99%E4%B8%8B%E4%B8%80%E6%AC%A1%E8%BF%AD%E4%BB%A3%E7%9B%B4%E5%88%B0%E9%9B%86%E5%90%88%E5%87%8F%E5%B0%91%E4%B8%BA%E5%8D%95%E4%B8%AA%E5%80%BC.md) [reverse方法 倒转集合中项目的顺序](reverse%E6%96%B9%E6%B3%95%E5%80%92%E8%BD%AC%E9%9B%86%E5%90%88%E4%B8%AD%E9%A1%B9%E7%9B%AE%E7%9A%84%E9%A1%BA%E5%BA%8F.md) [shuffle方法 随机排序集合中的项目](shuffle%E6%96%B9%E6%B3%95%E9%9A%8F%E6%9C%BA%E6%8E%92%E5%BA%8F%E9%9B%86%E5%90%88%E4%B8%AD%E7%9A%84%E9%A1%B9%E7%9B%AE.md) [sort方法 对集合进行排序](sort%E6%96%B9%E6%B3%95%E5%AF%B9%E9%9B%86%E5%90%88%E8%BF%9B%E8%A1%8C%E6%8E%92%E5%BA%8F.md) [sortBy方法 以给定的键对集合进行排序](sortBy%E6%96%B9%E6%B3%95%E4%BB%A5%E7%BB%99%E5%AE%9A%E7%9A%84%E9%94%AE%E5%AF%B9%E9%9B%86%E5%90%88%E8%BF%9B%E8%A1%8C%E6%8E%92%E5%BA%8F.md) [sortByDesc方法 与 sortBy 方法一样,但是会以相反的顺序来对集合进行排序](sortByDesc%E6%96%B9%E6%B3%95%E4%B8%8EsortBy%E6%96%B9%E6%B3%95%E4%B8%80%E6%A0%B7%EF%BC%8C%E4%BD%86%E6%98%AF%E4%BC%9A%E4%BB%A5%E7%9B%B8%E5%8F%8D%E7%9A%84%E9%A1%BA%E5%BA%8F%E6%9D%A5%E5%AF%B9%E9%9B%86%E5%90%88%E8%BF%9B%E8%A1%8C%E6%8E%92%E5%BA%8F.md) [split方法 将集合按给定的值拆分](split%E6%96%B9%E6%B3%95%E5%B0%86%E9%9B%86%E5%90%88%E6%8C%89%E7%BB%99%E5%AE%9A%E7%9A%84%E5%80%BC%E6%8B%86%E5%88%86.md) [times方法 通过回调在给定次数内创建一个新的集合](times%E6%96%B9%E6%B3%95%E9%80%9A%E8%BF%87%E5%9B%9E%E8%B0%83%E5%9C%A8%E7%BB%99%E5%AE%9A%E6%AC%A1%E6%95%B0%E5%86%85%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E6%96%B0%E7%9A%84%E9%9B%86%E5%90%88.md) [toArray方法 将集合转换成 PHP 数组](toArray%E6%96%B9%E6%B3%95%E5%B0%86%E9%9B%86%E5%90%88%E8%BD%AC%E6%8D%A2%E6%88%90PHP%E6%95%B0%E7%BB%84.md) [toJson方法 将集合转换成 JSON 字符串](toJson%E6%96%B9%E6%B3%95%E5%B0%86%E9%9B%86%E5%90%88%E8%BD%AC%E6%8D%A2%E6%88%90JSON%E5%AD%97%E7%AC%A6%E4%B8%B2.md) [union方法 将给定的数组添加到集合中](union%E6%96%B9%E6%B3%95%E5%B0%86%E7%BB%99%E5%AE%9A%E7%9A%84%E6%95%B0%E7%BB%84%E6%B7%BB%E5%8A%A0%E5%88%B0%E9%9B%86%E5%90%88%E4%B8%AD.md) [unique方法 返回集合中所有唯一的项目](unique%E6%96%B9%E6%B3%95%E8%BF%94%E5%9B%9E%E9%9B%86%E5%90%88%E4%B8%AD%E6%89%80%E6%9C%89%E5%94%AF%E4%B8%80%E7%9A%84%E9%A1%B9%E7%9B%AE.md) [uniqueStrict方法](uniqueStrict%E6%96%B9%E6%B3%95.md) [values方法 返回键被重置为连续编号的新集合](values%E6%96%B9%E6%B3%95%E8%BF%94%E5%9B%9E%E9%94%AE%E8%A2%AB%E9%87%8D%E7%BD%AE%E4%B8%BA%E8%BF%9E%E7%BB%AD%E7%BC%96%E5%8F%B7%E7%9A%84%E6%96%B0%E9%9B%86%E5%90%88.md) [chunkWhile 方法根据指定的回调值把集合分解成多个更小的集合:](chunkWhile%E6%96%B9%E6%B3%95%E6%A0%B9%E6%8D%AE%E6%8C%87%E5%AE%9A%E7%9A%84%E5%9B%9E%E8%B0%83%E5%80%BC%E6%8A%8A%E9%9B%86%E5%90%88%E5%88%86%E8%A7%A3%E6%88%90%E5%A4%9A%E4%B8%AA%E6%9B%B4%E5%B0%8F%E7%9A%84%E9%9B%86%E5%90%88%EF%BC%9A.md) [crossJoin 方法交叉连接指定数组或集合的值,返回所有可能排列的笛卡尔积:](crossJoin%E6%96%B9%E6%B3%95%E4%BA%A4%E5%8F%89%E8%BF%9E%E6%8E%A5%E6%8C%87%E5%AE%9A%E6%95%B0%E7%BB%84%E6%88%96%E9%9B%86%E5%90%88%E7%9A%84%E5%80%BC%EF%BC%8C%E8%BF%94%E5%9B%9E%E6%89%80%E6%9C%89%E5%8F%AF%E8%83%BD%E6%8E%92%E5%88%97%E7%9A%84%E7%AC%9B%E5%8D%A1%E5%B0%94%E7%A7%AF%EF%BC%9A.md) [duplicates 方法从集合中检索并返回重复的值:](duplicates%E6%96%B9%E6%B3%95%E4%BB%8E%E9%9B%86%E5%90%88%E4%B8%AD%E6%A3%80%E7%B4%A2%E5%B9%B6%E8%BF%94%E5%9B%9E%E9%87%8D%E5%A4%8D%E7%9A%84%E5%80%BC%EF%BC%9A.md) [duplicatesStrict()](duplicatesStrict.md) [join 方法会将集合中的值用字符串连接:](join%E6%96%B9%E6%B3%95%E4%BC%9A%E5%B0%86%E9%9B%86%E5%90%88%E4%B8%AD%E7%9A%84%E5%80%BC%E7%94%A8%E5%AD%97%E7%AC%A6%E4%B8%B2%E8%BF%9E%E6%8E%A5%EF%BC%9A.md) [mergeRecursive 方法以递归的形式合并给定的数组或集合到原集合中,如果给定集合项的字符串键与原集合的字符串键一致,则会将给定的集合项的值以递归的形式合并到原集合的相同键中](mergeRecursive%E6%96%B9%E6%B3%95%E4%BB%A5%E9%80%92%E5%BD%92%E7%9A%84%E5%BD%A2%E5%BC%8F%E5%90%88%E5%B9%B6%E7%BB%99%E5%AE%9A%E7%9A%84%E6%95%B0%E7%BB%84%E6%88%96%E9%9B%86%E5%90%88%E5%88%B0%E5%8E%9F%E9%9B%86%E5%90%88%E4%B8%AD%EF%BC%8C%E5%A6%82%E6%9E%9C%E7%BB%99%E5%AE%9A%E9%9B%86%E5%90%88%E9%A1%B9%E7%9A%84%E5%AD%97%E7%AC%A6%E4%B8%B2%E9%94%AE%E4%B8%8E%E5%8E%9F%E9%9B%86%E5%90%88%E7%9A%84%E5%AD%97%E7%AC%A6%E4%B8%B2%E9%94%AE%E4%B8%80%E8%87%B4%EF%BC%8C%E5%88%99%E4%BC%9A%E5%B0%86%E7%BB%99%E5%AE%9A%E7%9A%84%E9%9B%86%E5%90%88%E9%A1%B9%E7%9A%84%E5%80%BC%E4%BB%A5%E9%80%92%E5%BD%92%E7%9A%84%E5%BD%A2%E5%BC%8F%E5%90%88%E5%B9%B6%E5%88%B0%E5%8E%9F%E9%9B%86%E5%90%88%E7%9A%84%E7%9B%B8%E5%90%8C%E9%94%AE%E4%B8%AD.md) [pad 方法将使用给定的值填充数组,直到数组达到指定的大小](pad%E6%96%B9%E6%B3%95%E5%B0%86%E4%BD%BF%E7%94%A8%E7%BB%99%E5%AE%9A%E7%9A%84%E5%80%BC%E5%A1%AB%E5%85%85%E6%95%B0%E7%BB%84%EF%BC%8C%E7%9B%B4%E5%88%B0%E6%95%B0%E7%BB%84%E8%BE%BE%E5%88%B0%E6%8C%87%E5%AE%9A%E7%9A%84%E5%A4%A7%E5%B0%8F.md) [skip 方法返回除了给定的元素数目的新集合:](skip%E6%96%B9%E6%B3%95%E8%BF%94%E5%9B%9E%E9%99%A4%E4%BA%86%E7%BB%99%E5%AE%9A%E7%9A%84%E5%85%83%E7%B4%A0%E6%95%B0%E7%9B%AE%E7%9A%84%E6%96%B0%E9%9B%86%E5%90%88%EF%BC%9A.md) [skipUntil 方法将跳过元素直到给定的回调函数返回 true,然后返回集合中剩余的元素](skipUntil%E6%96%B9%E6%B3%95%E5%B0%86%E8%B7%B3%E8%BF%87%E5%85%83%E7%B4%A0%E7%9B%B4%E5%88%B0%E7%BB%99%E5%AE%9A%E7%9A%84%E5%9B%9E%E8%B0%83%E5%87%BD%E6%95%B0%E8%BF%94%E5%9B%9Etrue%EF%BC%8C%E7%84%B6%E5%90%8E%E8%BF%94%E5%9B%9E%E9%9B%86%E5%90%88%E4%B8%AD%E5%89%A9%E4%BD%99%E7%9A%84%E5%85%83%E7%B4%A0.md) [sortKeys 方法通过底层关联数组的键来对集合进行排序:](sortKeys%E6%96%B9%E6%B3%95%E9%80%9A%E8%BF%87%E5%BA%95%E5%B1%82%E5%85%B3%E8%81%94%E6%95%B0%E7%BB%84%E7%9A%84%E9%94%AE%E6%9D%A5%E5%AF%B9%E9%9B%86%E5%90%88%E8%BF%9B%E8%A1%8C%E6%8E%92%E5%BA%8F%EF%BC%9A.md) [sortKeysDesc 该方法与 sortKeys 方法一样,但是会以相反的顺序来对集合进行排序。](sortKeysDesc%E8%AF%A5%E6%96%B9%E6%B3%95%E4%B8%8EsortKeys%E6%96%B9%E6%B3%95%E4%B8%80%E6%A0%B7%EF%BC%8C%E4%BD%86%E6%98%AF%E4%BC%9A%E4%BB%A5%E7%9B%B8%E5%8F%8D%E7%9A%84%E9%A1%BA%E5%BA%8F%E6%9D%A5%E5%AF%B9%E9%9B%86%E5%90%88%E8%BF%9B%E8%A1%8C%E6%8E%92%E5%BA%8F%E3%80%82.md) [splitIn 方法将集合分为给定数量的组,在将其余部分分配给最终组之前,完全填充非终端组:](splitIn%E6%96%B9%E6%B3%95%E5%B0%86%E9%9B%86%E5%90%88%E5%88%86%E4%B8%BA%E7%BB%99%E5%AE%9A%E6%95%B0%E9%87%8F%E7%9A%84%E7%BB%84%EF%BC%8C%E5%9C%A8%E5%B0%86%E5%85%B6%E4%BD%99%E9%83%A8%E5%88%86%E5%88%86%E9%85%8D%E7%BB%99%E6%9C%80%E7%BB%88%E7%BB%84%E4%B9%8B%E5%89%8D%EF%BC%8C%E5%AE%8C%E5%85%A8%E5%A1%AB%E5%85%85%E9%9D%9E%E7%BB%88%E7%AB%AF%E7%BB%84%EF%BC%9A.md) [takeUntil 方法将返回集合中的元素,直到给定的回调函数返回 true](takeUntil%E6%96%B9%E6%B3%95%E5%B0%86%E8%BF%94%E5%9B%9E%E9%9B%86%E5%90%88%E4%B8%AD%E7%9A%84%E5%85%83%E7%B4%A0%EF%BC%8C%E7%9B%B4%E5%88%B0%E7%BB%99%E5%AE%9A%E7%9A%84%E5%9B%9E%E8%B0%83%E5%87%BD%E6%95%B0%E8%BF%94%E5%9B%9Etrue.md) [wrap 方法会将给定值封装到集合中](wrap%E6%96%B9%E6%B3%95%E4%BC%9A%E5%B0%86%E7%BB%99%E5%AE%9A%E5%80%BC%E5%B0%81%E8%A3%85%E5%88%B0%E9%9B%86%E5%90%88%E4%B8%AD.md)