How do I filter the text, “positivity” while preserving parents? – SitePoint

How do I filter the text, “positivity” while preserving parents. Note the parents are in ascending order.

By: Maria