No, you should have written an array of values to begin with.
Coercing data types is surely more wrong than taking the most recently supplied value for a given key in a map.
Coercing data types is surely more wrong than taking the most recently supplied value for a given key in a map.
What, exactly, do you think should happen if you have an object of the form
? Objects in JSON are key-value pairs. A single key goes to a single value. Instead, you should map task to an array of values.