02-23-2021 10:28 AM
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?
02-23-2021 10:55 AM
I recommend a Mapper expression using the Array filter function:
02-23-2021 11:11 AM
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.
02-23-2021 11:16 AM
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)
02-24-2021 05:42 AM
Thanks for the help!