I'm iterating over a list with the structure
[
%{color: "green", index: 0},
%{color: "blue", index: 1}
]
and I want to pass this to a function but I getting errors saying: no function clause matching
def myFunction(%{color: color, index: index}) do
IO.inspect(color)
end
what am i doing wrong to pattern match on this?