# Idx

Idx is a collection that allows creating indices on it and accessing it with a map-like API, for example:

iex> users = [%{name: "Bob", age: 20}, %{name: "Eve", age: 27}, %{name: "John", age: 45}]
iex> idx =, & &
iex> Idx.get(idx, "Bob")
%{name: "Bob", age: 20}
iex> idx = Idx.create_index(idx, :initial, &String.first(&
iex> Idx.get(idx, Idx.key(:initial, "J"))
%{name: "John", age: 45}
iex> idx |> Enum.to_list() |> Enum.sort()

For more details, see the [docs](

## Installation

The package can be installed by adding `idx` to your list of dependencies in `mix.exs`:

def deps do
    {:idx, "~> 0.1.0"}