Replies: 2 comments 1 reply
-
It would be great to have this option! |
Beta Was this translation helpful? Give feedback.
0 replies
-
I believe you can use optional-chaining to qualify subscript assignment: array[id: element.id]? = element Does this work for you? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all,
thanks for the great framework. I would be interested in having an update function only if an object already exists in the array. Otherwise the update does nothing. If you think this is a useful addition I would create a merge request for this feature.
public mutating func updateIfExists(_ item: Element) -> Element?
Beta Was this translation helpful? Give feedback.
All reactions