We have documents in a container with Parent child relation, I wanted to join these items if I pass inner folder id(FolderId = 3), it should return all parents as well.
Item 1 { "FolderId": "1", "FolderName": "Folder 1", "ParentFolderId": null }
Item 2 { "FolderId": "2", "FolderName": "Folder 2", "ParentFolderId": 1, }
Item 3 { "FolderId": "3", "FolderName": "Folder 3", "ParentFolderId": 2, }