{
"modifiedTime": "2021-12-13T06:47:11.138Z",
"task_owner_name": null,
"contents": [
{
"eligible": false,
"rawResponse": "454536251",
"id": 868286622
},
{
"eligible": false,
"categoryScores": null,
"analysisRequired": false,
"questionId": 1000036797,
"rawResponse": "454536251"
},
{
"eligible": true,
"categoryScores": null,
"analysisRequired": true,
"questionId": 1000036794,
"rawResponse": "Us06OA26CyGf+TyFQU0t1lEjqs9OsOgBl0Uh1FcWg8lKODvn1573ODvleS9n9oU0mmcwd"
}
],
"author_post_flag": false
}
I need to loop through "contents" array and need to perform decrypt the field "rawResponse" if "eligible" == "true"
currently Im doing like this
filter {
if [contents][0][eligible]{
cipher
{
mode => decrypt
algorithm => "AES-256-CBC"
iv_random_length => 16
key => "***************"
key_size => 32
source => "[contents][0][rawResponse]"
target => "[contents][0][rawResponse]"
}}}
It is working but I need to dynamically get the index value of the array , Currently it is hard coded, Can anyone please help