search cancel

Masking multiple tag attributes in JSON file

book

Article ID: 190008

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

       We are able to successfully mask the single json request present in JSON file, whereas we tried to mask json file which contains array of JSON data – In this case only the first json request getting masked and remaining request are excluded in the output file. Kindly help on this on how to execute multiple json request present in single file.

Environment

Release : 4.8

Component : CA Test Data Manager

Resolution

As JSON is invalid file, you can not apply masking on invalid JSON. So, use the JSON which I have attached support case and, apply your own masking function on respective attribute say for ID, you applied masking function as Fomatencrypt. In Summary page, you will see the Xpath field as below:

$[0]['glossary']['subtsg']['TagListt']['TagEntry']['ID']

Now, modify the above value to the value given below (where I am changing 0 to *. This will apply masking function to all entries

$[*]['glossary']['subtsg']['TagListt']['TagEntry']['ID']

After this change, run the masking. You will see changes applies to all values.