Methods
(static) groupby(arr, property, optsopt) → {Object}
group elements of array by property
.group elements of array by property
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
arr |
Array | source array of objects |
||||||||||
property |
String | property for grouping |
||||||||||
opts |
Object |
<optional> |
options Properties
|
Returns:
- Type
- Object
(static) indexby(arr, property, optsopt) → {Object}
build index on array elements by property
.build index on array elements by property
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
arr |
Array | source array of objects |
||||||||||
property |
String | property for index |
||||||||||
opts |
Object |
<optional> |
options Properties
|
Returns:
- Type
- Object