Assigning different variables to different fields in json with the same name

Hello,
I have problem with assigning different variables to different fields in json with the same name.
I would like to assign 3 different variables to 3 different “value” fields under parameters in a json file.
Thank you in advance for your help

My json:

{
“schemeId”: {
“name”: “660fb0a382112a661db71c9c”,
“packetName”: “idm_users”,
“packetVersion”: {
“major”: 1,
“minor”: 18,
“patch”: 0
}
},
“description”: “Save KDRCP Id”,
“parameters”: [[
{
“name”: “660fb0c1ea5d4f4ab4002518”,
“label”: “name”,
“type”: “TEXT”,
“empty”: false,
“value”:“”
},
{
“name”: “660fb0c41efba858aa01de69”,
“label”: “surname”,
“type”: “TEXT”,
“empty”: false,
“value”:“”
},
{
“name”: “660fb0b4e2cf8c7d116cad4c”,
“label”: “kdrcp_id”,
“type”: “TEXT”,
“empty”: false,
“value”:“”
},
]]
}

@Ripper

May I know on what basis you need to assign?

Cheers

@Ripper,

You can precisely achieve this by deserializing this json into json object then assign the values there and again serialize it back to json.

Thanks,
Ashok :slight_smile:

Hello,
I made it in different way,
Just replace what i need in my json file with: ({imie}, {nazwisko}, {nr}) :

{
“schemeId”: {
“name”: “660fb0a382112a661db71c9c”,
“packetName”: “idm_users”,
“packetVersion”: {
“major”: 1,
“minor”: 18,
“patch”: 0
}
},
“description”: “Save KDRCP Id”,
“parameters”: [[
{
“name”: “660fb0c1ea5d4f4ab4002518”,
“label”: “name”,
“type”: “TEXT”,
“empty”: false,
“value”:“{imie}”
},
{
“name”: “660fb0c41efba858aa01de69”,
“label”: “surname”,
“type”: “TEXT”,
“empty”: false,
“value”:“{nazwisko}”
},
{
“name”: “660fb0b4e2cf8c7d116cad4c”,
“label”: “kdrcp_id”,
“type”: “TEXT”,
“empty”: false,
“value”:“{nr}”
},
]]
}

and I used the assigne activity with replace.
Problem solved

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