I’ve had similar problem once, getting the right transforms and filtering them. I ended up writing my data structure class which mimics transform hierarchy. From that point i had methods to filter or find whatever i want.
I made this extension method. May be slow, but if it’s only called in awake that shouldn’t be much of a problem.
public static Transform GetChild(this Transform transform, string name)
Transform arr = transform.gameObject.GetComponentsInChildren<Transform> ();
foreach(Transform t in arr)
if(t.gameObject.name == name)
Edit: Whoops! Didn’t notice you wanted JS. Hopefully this will help somebody else.