weld icon indicating copy to clipboard operation
weld copied to clipboard

Feature request: ordereddict (and keys/values?)

Open radujica opened this issue 7 years ago • 0 comments

I need to implement unique on an array of values but preserving order.

So for [3, 3, 2, 4] the result must be [3, 2, 4] not [2, 4, 3] or some other order. If the ordered precondition could be dropped, then using dictmerger would suffice.

There does not seem to be any way to accomplish the above unless there would e.g. be a sort on dict keys, or an ordereddict (like Python's OrderedDict), or exists on a builder.

On that note, accessing a dict's keys and/or values without using tovec & map would be very useful and seems easy to implement.

radujica avatar Apr 05 '18 15:04 radujica