# Getting result of query into a list format

**URL:** <https://community.neo4j.com/t/getting-result-of-query-into-a-list-format/42193>\
**Category:** Neo4j Graph Platform\
**Tags:** browser, cypher\
**Created:** [July 30, 2021, 12:09am UTC](https://community.neo4j.com/t/getting-result-of-query-into-a-list-format/42193 "2021-07-30T00:09:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![taouichaimaa](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/taouichaimaa/32/19461_2.png) [@taouichaimaa](https://community.neo4j.com/u/taouichaimaa)\
**Post date:** [July 30, 2021, 12:09am UTC](https://community.neo4j.com/t/getting-result-of-query-into-a-list-format/42193/1 "2021-07-30T00:09:08Z")

</div>

Hello, I'm working on a database that has two types of nodes : jobs and skills . They have a 'USES' relationship.

I am able of getting all skills used in a certain job. However I would like to have the skill.name of all skills in a list in the response json using this:

```auto
MATCH (n:Technologies)<-[u:USES]-(j:Jobs) where j.name="skilname" return n.name order by n.trend ASC limit 25

```

Basically, this is what I'm getting:

```auto
[
  {
    "keys": [
      "n.name"
    ],
    "length": 1,
    "_fields": [
      "TKProf"
    ],
    "_fieldLookup": {
      "n.name": 0
    }
  },
  {
    "keys": [
      "n.name"
    ],
    "length": 1,
    "_fields": [
      "SmarTeam"
    ],
    "_fieldLookup": {
      "n.name": 0
    }

```

But I would like to get this:

```auto
[{keys:["n. name"],
values: [skill1.name,skill2.name,skill3.name.....]
}
]

```

Any tip is well appreciated, thank you.

---

<div class="post-metadata">

**Author:** ![clair.sullivan](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/clair.sullivan/32/16017_2.png) [@clair.sullivan](https://community.neo4j.com/u/clair.sullivan)\
**Post date:** [July 30, 2021, 3:04pm UTC](https://community.neo4j.com/t/getting-result-of-query-into-a-list-format/42193/2 "2021-07-30T15:04:21Z")

</div>

You might consider trying [`COLLECT`](https://neo4j.com/docs/cypher-manual/current/functions/aggregating/#functions-collect)...something like `RETURN COLLECT(n.name) AS nameList`?

---

<div class="post-metadata">

**Author:** ![taouichaimaa](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/taouichaimaa/32/19461_2.png) [@taouichaimaa](https://community.neo4j.com/u/taouichaimaa)\
**Post date:** [August 1, 2021, 4:14pm UTC](https://community.neo4j.com/t/getting-result-of-query-into-a-list-format/42193/3 "2021-08-01T16:14:16Z")

</div>

Thank you! I ended up using ` with COLLECT(n.name) as namelist return namelist` .
