Expression to access a layer in a different composition

/**
* The following expression will allow you to access a layer
* in a different after effects comp
* Replace COMP NAME with the composition name
* Replace LAYER NAME with the specific layer name
*/
comp("COMP NAME").layer("LAYER NAME");

Example usage:

/**
* Access the position of the layer called: My text layer
* within the composition: 1. Main Comp
**/
comp("1. Main Comp").layer("My text layer").position;