FortiSOAR Discussions
Dretzer
New Contributor

FortiSOAR Multiple loop

Hello everyone,

 

I am currently a beginner on FortiSOAR and I have a ‘problem’, using an API to retrieve a lot of information, I have a little trouble processing on FortiSOAR unlike using a standard programming language.

 

I'd like to process data like this:

items :
    [0] : 
        id : xx
        indicators : 
            [0] :
                type : xxx
            [1] :
                type : xxx
    [1] : 
        id : xx
        indicators : 
            [0] :
                type : xxx
            [1] :
                type : xxx

 

I can't figure out how to process each item as a unit first

then process the indicators as a unit and then carry out other actions.

Maybe the answer has already been given, but I couldn't find it.

 

if anyone can help me that would be great news

 

Best regards,

1 Solution
Jtamboli
Staff
Staff

 

Hi @Dretzer,

I hope I have understood your question correctly.

Attached below is the playbook.json file where I have provided a solution to the mentioned problem.

Note: I have made a few field changes in your JSON data for better clarity and understanding. Here is the updated data I used:

 

 
{ "data": [ { "id": "123", "indicators": [ { "type": "email", "value": "user1@example.com" }, { "type": "ip_address", "value": "192.168.1.1" } ] }, { "id": "456", "indicators": [ { "type": "domain", "value": "example.com" }, { "type": "url", "value": "https://example.com/page" } ] } ] }

I hope this helps.

 


Junaid
Software QA Engineer - 1



Junaid

View solution in original post

2 REPLIES 2
Jtamboli
Staff
Staff

 

Hi @Dretzer,

I hope I have understood your question correctly.

Attached below is the playbook.json file where I have provided a solution to the mentioned problem.

Note: I have made a few field changes in your JSON data for better clarity and understanding. Here is the updated data I used:

 

 
{ "data": [ { "id": "123", "indicators": [ { "type": "email", "value": "user1@example.com" }, { "type": "ip_address", "value": "192.168.1.1" } ] }, { "id": "456", "indicators": [ { "type": "domain", "value": "example.com" }, { "type": "url", "value": "https://example.com/page" } ] } ] }

I hope this helps.

 


Junaid
Software QA Engineer - 1



Junaid
Dretzer
New Contributor

Hello,


Thank you for your reply,

This is the type of answer I was looking for.


Yours sincerely