Skip to content

Instantly share code, notes, and snippets.

@jonleighton
Created February 9, 2017 18:41

Revisions

  1. jonleighton created this gist Feb 9, 2017.
    5 changes: 5 additions & 0 deletions code.ex
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    # Option 1
    list |> List.wrap |> Enum.map(&(&1["value"]))

    # Option 2
    Enum.map(List.wrap(list), &(&1["value"]))