Path between Nodes

I want to retrieve nodes based on the hop count.
I'll give the start node and end node and also the hop count
So, give me those nodes who matches the hop in the database

Hi @gaminbot3813

With the below dataset

Query Used
Match p=(a:N{name:$startNode})--(b:N{name:$endNode}) with a as a, nodes(p) as nodesInPath where $hopCount =size(nodesInPath) -2 return a,nodesInPath

:param hopCount=>1
:param startNode=>'A'
:param endNode=>'D'