Cypher query using Java (Match operator)

Hello everyone,

I am new in Neo4j and Java programming, and I am trying to get all the properties of an object (node), giving as a condition that my ID must be equal to the text I am writing (abcd).

This is how I wrote it:

MatchQuery.send(JSON.stringify({"query" : "MATCH (n {name: {Id}}) WHERE n.Id = {name} RETURN n","params" : {"Id" : "abcd","name" : "abcd}}

I hope my question is clear and someone can help me.
Thanks!

Someone more familiar with the Java client might correct me, but I think the logic of that query currently reads "find any nodes whose name = "abcd" and whose Id also = "abcd". Is that the criteria you're trying to construct?

Hello, correct, that is the logic of the query, but my problem is that when I run the query I do not get results because there is something wrong. What I am looking for is how to correct the statement.
Thanks

Can you explain how the query should be behaving, that might help?

Also have you tried breaking it down into smaller parts, to confirm your data is as you expect? Maybe try matching on one property (name) and then separately matching on Id.