Passing data from parent to its child item's snippet

I completely forgot whether it is possible or not.

I have a parent content item (CT-A) that has another child content item (CT-B) in its slot using snippet template, SNP-B.

In SNP-B template, I want to write a JCR Query so it gets all the content items of content type, CT-C. Also I want to filter in the JCR query so it gets all items of only type XYZ. This type XYZ value comes from a field in CT-A, which is the parent content item. So my question is, how do you pass a value from parent content item to the snippet of its child item.

thanks
Manvinder

Please see “Passing parameters from page into snippets within a slot