I have data that is stored in recursion using another object as below
(s:Source)-[r:Link]->(s1:Source)-[r:Link]->(s2:Source)
Though there can be some intermediate object(s) as well and the depth is not fixed. Can be one or 5 or 10 as well.
(s:Source)-[r:Link]->(f1:Feature)-[r:Link]->(s2:Source)
(s:Source)-[r:Link]->(f1:Feature)-[r:Link]->(f2:Feature)-[r:Link]->(s1:Source)
Another scenario is a Source can be linked to multiple Source/Feature and the they will be further linked in same way.
(s:Source)-[r:Link]->(f1:Feature)
(s:Source)-[r:Link]->(f2:Feature)
(s:Source)-[r:Link]->(f3:Feature)
(f1:Feature)-[r:Link]->(s1:Source)
(f2:Feature)-[r:Link]->(s2:Source)
(f3:Feature)-[r:Link]->(s3:Source)
I am using below query to get the data
MATCH(s:Source)-[r:Target-Feature
*]->(n:Source)
return s.Name, n.Name;
Though I am able to get the data correctly, I am not able to display that dynamically in a tabular format which clearly shows the Sources at each hop(excluding intermediate Feature objects) including handling the multi to multi linking.