I am trying to get only which category name that assigned a product and which category's have not any sub-category.
E.g :
Category
-> Sub-category 1
-> Sub-category 2
-> Sub-category 3
-> Sub-sub-category 1
-> sub-Sub-category 2
-> product 1
-> product 2
The above example , I want to get only sub-sub-category 2.