KitchenSink v1.0.0 KitchenSink.List

this module is for List functions

Summary

Functions

See KitchenSink.List.IndexBy.index_by/2

takes a list of maps, transforms it into a map of maps with their value being the value_key. basically making a look-up table

A convenient version of what is perhaps the most common use-case for map: extracting a list of property values

Functions

index_by(list, path)

See KitchenSink.List.IndexBy.index_by/2.

index_on(list_of_maps, take_keys, value_key)

takes a list of maps, transforms it into a map of maps with their value being the value_key. basically making a look-up table.

pluck(list_of_maps, key)

A convenient version of what is perhaps the most common use-case for map: extracting a list of property values.

With a List of Maps, extract 1 value defined by the key you give to pluck.