JSON decode unknown number of fields

Oh I’m sorry! You’re absolutely right. I missed the List.map inside the Decoder.map. I’ll update that in my answer. It’ll just be Json.Decode.keyValuePairs (Json.Decode.String) |> Json.Decode.map (List.map (\(key, value) -> value))

1 Like