Remove element from list that matches string

Hello. I’m entirely new to this, and have searched best I can for an example of how to achieve this without any luck.

I have this sample json input, and want to search for “Blocked” and remove that element

Input:

[
   {
      "title":[
         "Frontend",
         "Backend",
         "Blocked",
         "Data"
      ]
   }
]

Output:

[
   {
      "title":[
         "Frontend",
         "Backend",
         "Data"
      ]
   }
]

I think this needs to be achieved with a code block.

Any help would be appreciated

Hi @James_Allwood

You can also do it with a code node, but with this example it is done with simple nodes:

And welcome to the community of course :slight_smile:

Hey @James_Allwood.

As @BramKn commented, you can also solve this through the indexOf() method through the code node

Thanks very much for your help on this. That worked like a charm. I hadn’t realised that the IF node would split the results.

I certainly need to get to grips with the code now too

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