Comment Comment by _randyr You can skip the last Enum.map/into and just use Map.new: "file.json" |> File.read!() |> Jason.decode!() |> Stream.flat_map(& &1["children"]) |> Map.new(fn child -> {child["id"], child} end) parent _randyr 3 years ago