I want to set my mapping root on an array of objects, but I only want to pull back a subset of the objects based on one of the object properties. Is there any way to do this in the mapping root?
I recommend a Mapper expression using the Array filter function:
Thanks for the suggestion. I can do that, but I want the rest of the objects that are filtered out to be included in the end result untouched. I was hoping that I could just filter the ones I need to change in the mapping root with one snap instead of multiple.
Ok, so you want all the elements of the array in the result, not a subset, right? So in your Mapper with the Mapping Root Set, you could make every expression conditional:
condition ? (value-if-true) : (value-if-false)
Thanks for the help!