Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Substring function in JSON

hareeshreddyk
New Contributor III
New Contributor III

Hi team,

I tried to add the substring function in CreateaccountJSON REST connector to get the desired output, But not able to get it.

tried to substring the value of arsTasks.accountName = abc.[1234567]

Requirement is to substring the value from dot '.' from the value of arsTasks.accountName

\"username\": \"${requestAccessAttributes.get('ACCOUNTTYPE') == 'Service Account'? arsTasks.accountName.toString()?.substring(arsTasks.accountName.indexOf('.',arsTasks.accountName.indexOf']')).toLowerCase() : user.customproperty1.toLowerCase()}\"

the above one is not working, requesting for the working format.

 

3 REPLIES 3

rushikeshvartak
All-Star
All-Star
"username": "${requestAccessAttributes.get('ACCOUNTTYPE') == 'Service Account' ? arsTasks.accountName.toString()?.substring(arsTasks.accountName.indexOf('.') + 1).toLowerCase() : user.customproperty1.toLowerCase()}"

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hi @rushikeshvartak  thanks for that,

But its getting the values after dot".".

Eg: [1234567]

Required to get the values prefix of dot ".'

Eg: abc

arsTasks.accountName = abc.[1234567]

"username": "${requestAccessAttributes.get('ACCOUNTTYPE') == 'Service Account' ? arsTasks.accountName.toString()?.substring(0, arsTasks.accountName.indexOf('.')).toLowerCase() : user.customproperty1.toLowerCase()}"

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.