"hogehoge", address: nil, age: 4}, %{name: "fugafuga", address: "aaa",age: 16}] [ %{address: "aaa", age: 16, name: "hogehoge"}, %{address: nil, age: 4, name: "hogehoge"}, %{address: "aaa", age: 16, name: "fugafuga"} ] iex(4)> EnumLikeSqlUtil.group_by(users, [:name]) [ {%{name: "fugafuga"}, [%{address: "aaa", age: 16, name: "fugafuga"}]}, {%{name: "hogehoge"}, [ %{address: "aaa", age: 16, name: "hogehoge"}, %{address: nil, age: 4, name: "hogehoge"} ]} ]