diff --git a/API.md b/API.md
index 8ec6f82b..ce4576ec 100644
--- a/API.md
+++ b/API.md
@@ -60,7 +60,7 @@
* [.max([path])](#Array+max) ⇒ number
* [.median([path])](#Array+median) ⇒ number
* [.min([path])](#Array+min) ⇒ number
- * [.nest(id, link)](#Array+nest) ⇒ [Array.<Object>
](#Object)
+ * [.nest(link, id)](#Array+nest) ⇒ [Array.<Object>
](#Object)
* [.orderBy([field], [order])](#Array+orderBy) ⇒ [Array
](#Array)
* [.pad(size, [value])](#Array+pad) ⇒ [Array
](#Array)
* [.partition(fn)](#Array+partition) ⇒ [Array
](#Array)
@@ -550,26 +550,26 @@ Returns the minimum value of a given path
```
-### array.nest(id, link) ⇒ [Array.<Object>
](#Object)
+### array.nest(link, id) ⇒ [Array.<Object>
](#Object)
Given a flat array of objects linked to one another, it will nest them recursively
**Kind**: instance method of [Array
](#Array)
| Param | Type |
| --- | --- |
-| id | \*
|
| link | string
|
+| id | string
|
**Example**
```javascript
const comments = [
- { id: 1, parent_id: null },
- { id: 2, parent_id: 1 },
- { id: 3, parent_id: 1 },
- { id: 4, parent_id: 2 },
- { id: 5, parent_id: 4 }
+ { id: 1, comment_id: null },
+ { id: 2, comment_id: 1 },
+ { id: 3, comment_id: 1 },
+ { id: 4, comment_id: 2 },
+ { id: 5, comment_id: 4 }
];
-comments.nest(); // [{ id: 1, parent_id: null, children: [...] }]
+comments.nest("comment_id"); // [{ id: 1, comment_id: null, children: [...] }]
```