JSON Call dynamic keys help


(Michael Brand) #1

Currently using JSON Call step to make a REST API call and am getting a response back that looks like this:

{
“10013534937”: “SWIFT ADVANCES PLC, ARCADIA HOUSE, THE DRIVE, GREAT WARLEY, CM13 3BE”,
“10013946291”: “LUTEA HOUSE CAR PARK, WARLEY HILL BUSINESS PARK, THE DRIVE, GREAT WARLEY, CM13 3BE”,
“10014319389”: “MICRODEC LTD, GROUND FLOOR JUNIPER HOUSE, WARLEY HILL BUSINESS PARK, THE DRIVE, GREAT WARLEY, CM13 3BE”,
“10014319390”: “PART GROUND FIRST AND SECOND FLOORS JUNIPER HOUSE, WARLEY HILL BUSINESS PARK, THE DRIVE, GREAT WARLEY, CM13 3BE”,
“10014319709”: “JUPITER HOUSE, WARLEY HILL BUSINESS PARK, THE DRIVE, GREAT WARLEY, CM13 3BE”,
“10014319747”: “ATHONA LTD, FIRST FLOOR JUNIPER HOUSE, WARLEY HILL BUSINESS PARK, THE DRIVE, GREAT WARLEY, CM13 3BE”,
“10014319748”: “VANTAGE INSURANCE SERVICES, SECOND FLOOR JUNIPER HOUSE, WARLEY HILL BUSINESS PARK, THE DRIVE, GREAT WARLEY, CM13 3BE”,
“10014319749”: “SECOND FLOOR MEETING ROOM AND KITCHEN, WARLEY HILL BUSINESS PARK, THE DRIVE, GREAT WARLEY, CM13 3BE”,
“10014319750”: “MEETING ROOMS JUBILEE HOUSE, WARLEY HILL BUSINESS PARK, THE DRIVE, GREAT WARLEY, CM13 3BE”,
“10014321144”: “GROUND FLOOR, JUPITER HOUSE, THE DRIVE, GREAT WARLEY, CM13 3BE”,
“10014321145”: “F R P ADVISORY, FIRST FLOOR, JUPITER HOUSE, THE DRIVE, GREAT WARLEY, CM13 3BE”,
“10014321146”: “SECOND FLOOR, JUPITER HOUSE, THE DRIVE, GREAT WARLEY, CM13 3BE”,
“10025142770”: “ELECTRICITY SUB STATION 17M FROM SWIFT ADVANCES PLC, ARCADIA HOUSE THE DRIVE. 5M FROM THE, THE DRIVE, GREAT WARLEY, CM13 3BE”,
“10025151317”: “ELECTRICITY SUB STATION 4M FROM VANTAGE INSURANCE SERVICES LTD, JUNIPER HOUSE THE DRIVE. 1, THE DRIVE, GREAT WARLEY, CM13 3BE”,
“200000529522”: “JUNIPER HOUSE GROUND FLOOR UNIT 2, WARLEY HILL BUSINESS PARK, THE DRIVE, GREAT WARLEY, CM13 3BE”,
“200000529523”: “JUNIPER HOUSE SECOND FLOOR UNIT 2, WARLEY HILL BUSINESS PARK, THE DRIVE, GREAT WARLEY, CM13 3BE”,
“200000529524”: “WOODBERRY SECURITIES, LUTEA HOUSE, WARLEY HILL BUSINESS PARK, THE DRIVE, GREAT WARLEY, CM13 3BE”,
“200000529526”: “CLEANAWAY LTD, WARLEY HILL BUSINESS PARK, THE DRIVE, GREAT WARLEY, CM13 3BE”,
“200000530072”: “WARLEY HILL BUSINESS PARK, THE DRIVE, GREAT WARLEY, CM13 3BE”
}

Tried to set the paths as ‘$.*~’ and ‘$.*’ to retrieve the keys and values, but Ataccama does not think this is valid JSON. If I use those paths here: https://jsonpath.com/
it works correctly.


(Maksim Zhelyazkov) #2

Hello Michael,

Our JSON Call step does not support all JSON path features, including wildcards, so you cannot use them to parse JSON objects as you suggested. We are considering improving the JSON Call step with up-to-day features, but so far It is limited to extracting values from objects by fixed names. It cannot place all the names in one field, and all the values in the other.

What we suggested in the support ticket you opened regarding the issue, is to use a combination of Web Lookup Step and Splitter. If you decide to use this workaround and experience issues with it, let us know in the ticket and we will help you with troubleshooting.

Kind Regards,

Maksim