Check out example codes for "unity get all by tag". It will help you in understanding the concepts better.

Code Example 1

GameObject[] arrayGo = GameObject.FindGameObjectsWithTag("myTag");

Code Example 2

GameObject.FindWithTag("Enemy");

Code Example 3

string enemyTag = "Enemy";
Enemies = GameObject.FindGameObjectsWithTag(enemyTag);

Code Example 4

yourObjects = GameObject.FindGameObjectsWithTag("Respawn");

Learn ReactJs, React Native from akashmittal.com