what is the most idiomatic way of going through an...
# stdlib
a
what is the most idiomatic way of going through an array of json and setting a field on the object with the max on a particular field - and removing that field from everyone else
d
maxBy
and
forEach
a
is it possible to do it in one pass?
d
maxBy
does perform a check on each item, so you could perform the removal within that check.