Is there a way to utilize filterFilter functionality without creating a new array every time it runs? Instead of returning a new array, I'm looking to return an array of indexes and then retrieve the associated items in my service. This approach allows me to set up a $watch export on my service, enabling me to monitor changes on the original items rather than the filtered ones.
I've thought about replicating the angular filterFilter source code, but that doesn't seem sustainable in the long term. What other options do I have?
Context:
I'm developing a form wizard service that applies a schema to various steps, each with slightly different object structures, all contained within an array of objects. When using filterFilter, it generates a new array of objects. However, when I make modifications to the object within the service using a "setter," it creates a new object rather than updating the existing one, which is not what I need.