Find children Filtering with array

I’m trying to modify a crediting automation that I have. Currently it only credits for one product at a time. Now I’m taking in an argument that is a string array that contains multiple products.
My automation searches a bill, that includes lots of charges, like taxes, service fee’s etc…

I only want to find the children of the upper part of the bill.
There are checkboxes next to the product names, where if they are selected, that item gets added to a cart.

I only want to check the boxes for the products that are in my serviceArray {“apples”, “oranges”}, But on the bill, it says apples and oranges all over the place, so I only want to find the children which match apples and oranges, but that also only have a checkbox.

I don’t want it to find the children such as " Here is your Monthly bill for Apples and Oranges"

I only want it to select the one with the checkbox “Apples” -------5.99.
I really struggle finding children. Please help me! Give me some examples possibly ? I’ve tried various things, but I’m not getting anything right.

1 Like