Check out example codes for "unity reference parent gameobject". It will help you in understanding the concepts better.
Code Example 1
transform.parent.gameObject //Use this to reference the parent of the gameobject
Learn ReactJs, React Native from akashmittal.com