top | item 36315280 (no title) _randyr | 2 years ago 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) discuss order hn newest No comments yet.
No comments yet.