TreatAsArray option in the XMLToJSON policy is not working nested paths

Hi ,

Could you help me below scenario:

we need to maintain array even for single item in the array.

need to set below path element as array :

TerminationInquiry.PossibleMerchantMatches[i].TerminatedMerchant[i].Merchant.Principal

i tried xml to json policy as below with no luck

<XMLToJSON async="false" continueOnError="false" enabled="true" name="XML-to-JSON"> 
  <DisplayName>XML to JSON</DisplayName> 
  <Properties/> 
  <Options> 
    <TreatAsArray> 
      <!-- new element -->
      <Path unwrap="true">TerminationInquiry/PossibleInquiryMatches/TerminatedMerchant/Merchant/Principal</Path> 
    </TreatAsArray> 
  </Options> 
  <OutputVariable>response</OutputVariable> 
  <Source>response</Source> 
</XMLToJSON>
Solved Solved
1 1 129
1 ACCEPTED SOLUTION

it is working , it was my mistake and path provided was wrong.

nested path woking now as :

<TreatAsArray>
  <!-- new element -->
  <Path unwrap="true">TerminationInquiry/PossibleMerchantMatches/TerminatedMerchant/Merchant/Principal</Path>
</TreatAsArray>

View solution in original post

1 REPLY 1

it is working , it was my mistake and path provided was wrong.

nested path woking now as :

<TreatAsArray>
  <!-- new element -->
  <Path unwrap="true">TerminationInquiry/PossibleMerchantMatches/TerminatedMerchant/Merchant/Principal</Path>
</TreatAsArray>