Map index delete

Certified Senior Developer

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