Unexpected behaviour in the JSON.parse function on fulfillment targets.

Hi,

I ran in to some unexpected behaviour when setting up a fulfillment target to a REST Api in IGA (version 3.6.2).

Say the payload is structured like this.

{
  "changeSetId": 111,
  "changeItemId": 112,
  "changeRequestType": "ADD_APPLICATION_TO_USER",
  "fulfillmentInstructions": "Do it",
  "flowdata": {
    "fulfillmentInstructions": "Do it",
    "reason": "Kom igen",
    "_form_": {"request": {
      "fulfillmentInstructions": "Do it",
      "reason": "Kom igen"
    }}
  },
  "userName": "B E",
  "appName": "M",
  "reason": "Give access to B E as requested by T T.",
  "requesterName": "T T",
  "userProfile": {"ext_userId": "****"},
  "requesterProfile": {"ext_userId": "*****"}
}

In order to use the values that are under the userProfile and requesterProfile, you have to use the JSON.parse function twice, once on inputValues, then do it again on inputValuesParsed.userProfile, as shown below.

var inputValueParsed = JSON.parse(inputValue);
var user_ext = JSON.parse(inputValueParsed.userProfile);

If you do that, you can access the value "ext_userId" by simply using user_ext.ext_userId, otherwise, you can't access the structure that is beneath userProfile.

Shouldn't you be able to access them from the first parsing of the input values? Is this a problem with the JSON.parse function, or some behaviour in IGA? Because ithe payload can be validated as valid JSON, and I don't understand why I can't access the value from the userProfile if I don't use a second JSON.parse.