Hello All,
I am facing issue with the following map. I am building dynamic filters. Here is the map is the output. But I wanted to delete logicalExpression:{} from the map. It can be there at any level. If logicalExpression is null then my resulted map should not contain logicalExpression:{}
a!localVariables( local!conditions: { a!map( operator: "AND", logicalExpressions: { a!map( operator: "AND", filters: { a!map(field: null, operator: null, value: null), a!map(field: null, operator: null, value: null) }, logicalExpressions: { a!map( operator: "AND", filters: { a!map(field: null, operator: null, value: null), a!map(field: null, operator: null, value: null) }, logicalExpressions: {} ), a!map( operator: "AND", filters: { a!map(field: null, operator: null, value: null), a!map(field: null, operator: null, value: null) }, logicalExpressions: {} ) } ) } ) }, local!conditions )
Discussion posts and replies are publicly visible
It's a little ambiguous what you're after, without some examples of different inputs and what you would expect the outputs to be (and why).
Generally, you can't exactly "delete" something from a map, but similarly to the JSON approach, you could always structure an expression to build a new map from an existing map and just omit certain properties when needed.