No, if I do that I get the parent node id of the current folder. But what I want is, for object 112 in folder 2, the node of Folder 1, because that is the main location of this object.
Thus object 112 exists in 2 locations. Folder 1 is the main location. What I need is the Node Id (acutally I need the name) of Folder 1 when I am looking at Object 112 in folder 2.
I am using $node.parent.parent_node_id to fetch the grand-parent id. It is working fine. The problem comes when i am trying to fetch the same grandparent id in some other folder with the added locations.