Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/09/2024 02:51 AM
Hi Team,
I need assistance with extracting a specific part of a cp1 value and incorporating it into our JSON configuration.
Here’s the situation:
I need to use this extracted value in our JSON configuration
JSon
{
"call": [
{
"name": "Accounts",
"connection": "userAuth",
"url": "https://analyticsadmin.googleapis.com/v1alpha/${Accounts.customproperty5}",
"httpMethod": "DELETE",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
204
]
}
},
{
"name": "Properties",
"connection": "userAuth",
"url": "https://analyticsadmin.googleapis.com/v1alpha/${Accounts.customproperty5}",
"httpMethod": "DELETE",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
204
]
}
}
]
}
09/09/2024 04:13 AM
@Prashant16 try
account.customproperty5.split('/')[3]
09/09/2024 04:42 AM - edited 09/09/2024 04:43 AM
Can you try below
${Accounts.customproperty5.split('\')[3]}
if that doesn't work, which could happen, then
${Accounts.customproperty5.split('\\\\')[3]}
09/09/2024 05:37 AM
{
"call": [
{
"name": "Accounts",
"connection": "userAuth",
"url": "https://analyticsadmin.googleapis.com/v1alpha/${accounts?.customproperty5.substring(accounts?.customproperty5.lastIndexOf('/') + 1)}",
"httpMethod": "DELETE",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
204
]
}
},
{
"name": "Properties",
"connection": "userAuth",
"url": "https://analyticsadmin.googleapis.com/v1alpha/${accounts?.customproperty5.substring(accounts?.customproperty5.lastIndexOf('/') + 1)}",
"httpMethod": "DELETE",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
204
]
}
}
]
}