Syntax for JSON keys with spaces in Web Service connector attribute mapping object

I am trying to build an Account Aggregation HTTP operation on a web service connector. Currently, aggregations are not recognizing attributes with spaces in their jsonpath. Data:

{
    "data": [
        {
            "First Name": "Joe",
            "Last Name": "Smith",
            "Worker Email": "[email protected]"
        },
        {
            "First Name": "Joe",
            "Last Name": "Smith2",
            "Worker Email": "[email protected]"
        }
    ]
}

I’ve set root path to: $.data[*]. For the attribute mapping values, I’ve tried the following formats:

First Name
'First Name'
.'First Name'
"First Name"

I expected ‘First Name’ to be the solution but it does not work as I would expect. Anyone solve for this previously?

Hey Nicholas! Welcome to the SailPoint Developer Community; it’s wonderful having you here.

Spaces in JSON paths can be annoying to deal with, but there’s a simple solution with the appropriate syntax. You’re on the right track, and with just a little tweak, we should be able to get this to work.

The full path should be:
$.data.['First Name']

So, with your root path being $.data, you should set your attribute path value to be ['First Name']

Let me know how that works for you.

2 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.