Thanks!
The solution with filters and map look about right.
Re: IO.iodata_to_binary thing - i can’t just put things together this way, but overall it looks good, just need to add |> Enum.filter(fn(x) -> !is_nil(x) end), i.e.
[
(if data["a"] > 0, do: "text1"),
(if data["b"] > 0, do: "text2"),
(if data["c"] > 0, do: "text3")
] |> Enum.filter(fn(x) -> !is_nil(x) end)


















