Do modified collections maintain the same keys as original?

Posted 7 months ago by johnvoncolln

I have a collection of objects that I will do a filter method on to get a subset of objects from the original collection. For argument's sake, let's say I want to delete these items from the original collection. By using the forget method, I need to specify by key. Will the modified collection maintain the same keys as the original collection?

For this particular scenario, I know I could do a map() or something, but that wouldn't work for my real life problem...

Please sign in or create an account to participate in this conversation.