Filter edges between two nodes

I want to filter the edges between the two nodes according to the an edge property. However, only the nodes are getting filtered when I use the following Cypher query.

MATCH (s:Source {id: 54558})-[r:REL{prop: 8}]->(t:Target)
with s, collect(r) as filterededges, t return s, filterededges, t

Picture2

In the "Table" output, it is showing the correct result (one edge from the source node to the target node) How can I remove the unwanted edges that are displayed? I am using Neo4j version 5.

Thanks a lot!

Hello @kamalika.ray and welcome to the Neo4j community :slight_smile:

It's because of the Connected result nodes option:

Best regards,
Cobra

Hi Cobra,

Thank you very much! That helped.

Regards,
Kamalika