# Filter a list of properties in a selected node in Ne04j

**URL:** https://community.neo4j.com/t/filter-a-list-of-properties-in-a-selected-node-in-ne04j/16066
**Category:** Cypher
**Tags:** cypher
**Created:** [March 20, 2020, 3:02pm UTC](https://community.neo4j.com/t/filter-a-list-of-properties-in-a-selected-node-in-ne04j/16066 "2020-03-20T15:02:24Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![siddharth.a](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/siddharth.a/32/3932_2.png) [@siddharth.a](https://community.neo4j.com/u/siddharth.a)
#### Post date: [March 20, 2020, 3:02pm UTC](https://community.neo4j.com/t/filter-a-list-of-properties-in-a-selected-node-in-ne04j/16066/1 "2020-03-20T15:02:25Z")

</div>

I am new to Neo4j and have the following node structure in my graph

Name of the node : **Test**

```auto
{
  "A": "1",
  "B": "2",
  "C": "3",
  "D": "4",
  "E": "5",
  "F": "6",
}

```

My application requires the graph DB to return A, B and C as key-value pairs as-is from the node, something like

```auto
A | 1
B | 2
C | 3

```

I know how to return all the key-value pairs in a specific node using

```auto
MATCH (n:Test)
UNWIND keys(n) AS Parameter
RETURN Parameter,n[Parameter] as Value

```

I am stuck in getting only specific key-value pairs. Any help would be much appreciated!

---

<div class="post-metadata">

### Author: ![Joel](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/joel/32/17191_2.png) [@Joel](https://community.neo4j.com/u/Joel)
#### Post date: [March 20, 2020, 9:36pm UTC](https://community.neo4j.com/t/filter-a-list-of-properties-in-a-selected-node-in-ne04j/16066/2 "2020-03-20T21:36:06Z")

</div>

Hi Siddharth,

Wouldn't this work?

```auto
MATCH (n:Test)
return t.A, t.B, t.C

```

Or are you trying to dynamically find properties in some way?

---

<div class="post-metadata">

### Author: ![siddharth.a](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/siddharth.a/32/3932_2.png) [@siddharth.a](https://community.neo4j.com/u/siddharth.a)
#### Post date: [March 21, 2020, 2:17am UTC](https://community.neo4j.com/t/filter-a-list-of-properties-in-a-selected-node-in-ne04j/16066/3 "2020-03-21T02:17:19Z")

</div>

> [@Joel](#):
>
> MATCH (n:Test) return t.A, t.B, t.C

This would return only the value of the property. I would also want the name of the property returned in additional to it's value.

---

<div class="post-metadata">

### Author: ![jaini.kiran](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/jaini.kiran/32/9706_2.png) [@jaini.kiran](https://community.neo4j.com/u/jaini.kiran)
#### Post date: [March 21, 2020, 7:17am UTC](https://community.neo4j.com/t/filter-a-list-of-properties-in-a-selected-node-in-ne04j/16066/4 "2020-03-21T07:17:46Z")

</div>

Hi Siddharth

```auto
MATCH (n:Test)
UNWIND ['A','B','C'] AS Parameter
RETURN Parameter,n[Parameter] as Value

```

Hope this helps you.

---

<div class="post-metadata">

### Author: ![intouch\_vivek](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/intouch_vivek/32/4097_2.png) [@intouch\_vivek](https://community.neo4j.com/u/intouch_vivek)
#### Post date: [March 21, 2020, 6:12pm UTC](https://community.neo4j.com/t/filter-a-list-of-properties-in-a-selected-node-in-ne04j/16066/5 "2020-03-21T18:12:16Z")

</div>

> [@siddharth.a](#):
>
> MATCH (n:Test) UNWIND keys(n) AS Parameter RETURN Parameter,n[Parameter] as Value

@siddharth.a

Welcome to the community !!

use parameter query. If your using Neo4j 4.0  
try

:param a =\>'A';

MATCH (n:Test{name:$a)  
UNWIND keys(n) AS Parameter  
RETURN Parameter,n[Parameter] as Value
