Forum Discussion

Prabaharan's avatar
Prabaharan
Contributor
5 years ago
Solved

How to remove empty nodes in JSON request during run time in soapui?

Hi Team,   I have implemented a data driven framework for a soap project for which inputs are fetched from an excel file. I have used 'Conditional Inline Property expansion using Ternary Operator' ...
  • Prabaharan's avatar
    Prabaharan
    5 years ago

    Hi giovanni_favara ,

     

    Appreciate your help. But surprisingly, 'Conditional Inline Property Expansion using Ternary operator' rule itself is working here to remove empty object for REST project in Data-driven testing.

     

    Below syntax for your quick reference

    ${=context.expand("${Properties#initA_Value}") != '' ? '"initA": ' + context.expand("${Properties#initA_Value}") + ',' : ''}

     

    Thanks.