title: Cypher Query to Return Nodes in Path Order
body: <p>I have a neo4j graphdb that stores ordered collections of nodes (let's say Person nodes), and each of those people has a Talent node:</p>
  
  <p><code>(p:Person)-[:HAS_TALENT]-&gt;(t:Talent)</code></p>
  
  <p>I'm organizing a talent show, and have the schedule of the order in which people are going to perform:</p>
  
  <p><code>(p:Person)-[:FOLLOWS*]-&gt;(q:Person)</code></p>
  
  <p>I can write a query to return a path that represents the order in which the people perform, and when I return that path, the Person nodes show up in the order that they appear in the path.  However, when I do a sub-query to return the talents that the people are performing, they no longer show up ordered by the path.</p>
  
  <p>Is there a way to order nodes based on the order they appear in a path?  I've tried using <code>COLLECT</code> to get a list of Person nodes, but I can't seem to find a way to use that collection to get back an <em>ordered</em> list of Talent nodes.</p>
  
  <p>My current path-query looks something like this, with a special start and end node so I know who's first and last. (I don't have the DB in front of me right now, so apologies if it's not spot-on):</p>
  
  <p><code>MATCH p=(s:StartNode {side:"start"})-[:FOLLOWS*1..10]-&gt;(s:StartNode {side:"end"})
  RETURN p</code></p>
  
  <p>I've run through a lot of different options for retrieving the path from start to finish, and they have their pros and cons, but I can't find a way to retrieve the Talent nodes in the same order.</p>
  
  <hr>
  
  <p><strong>EDIT:</strong> It seems I may have over simplified my example scenario.  The database I'm actually working with has multiple paths from start to finish through Person nodes, and I have a query to first select just a single path from start to finish before moving ahead to match Talent nodes.  Apologies to @Dirk Horsten who answered the question I asked, but not the one I needed answered.</p>
  
  <p>Since I'm editing this already, @Dave Bennett 's answer solved my problem because the <code>unwind</code> function seems to keep the path's order intact for future MATCH clauses.</p>