Showing results for 
Search instead for 
Did you mean: 

Response in the form of table/columns + data instead of records


Version Used: neo4j-enterprise-3.5.17
Using npm module neo4j-driver, we are able to establish a driver connection.
On using the"Some read operations"), the result format is of records (i.e result.record).
Can we get the result in the format as we see in remote UI table OR Columns+data style.?( node-neo4j npm module does that, but doesn't support clustering.)

The expected result is exactly the one we get when we do http api request. Since we cannot do clustering + routing using http api, we are forced to use neo4j-driver which returns a different set of results.
So, how can we modify the stream results which Returns results in graph format? (

Can anyone help me with this to resolve the issue.?


Hi Spulimi,

welcome to the Neo4j community.

I might not be able to help you solve your entire problem, but maybe I able to show you a way of how it could be solved. I myself am using Neo4j with Java but don't know too much about Javascript. So, what I am going to show you is how I convert the record into whatever I want it to be in Java. I hope that there are possibilities for you then to go and find the equivalent functionalities in javascript.

So let's take a simple cypher query:

MATCH (p:Person) return p.surname,, p.homeTown

If I put the query into, I obtain a result:

Result myResult ="MATCH (p:Person) return p.surname,, p.homeTown");

I then convert the result into a list of records (not sure how this is done in javascript):

List<Record> myRecords = myResult.list();

I can then create an array and iterate through all the records to fill my array with the received data:

int iter = 0;
String [][] myArray = new String[myRecords.size()][3];
for( Record record: myRecords){
   myArray[iter][0] = record.get("surname").asString();
   myArray[iter][1] = record.get("name").asString();
   myArray[iter][2] = record.get("homeTown").asString();

Now I have a "table" (array) with exactly the same data that is shown if I simply insert the cypher query into the Neo4j Browser.

I hope this helps you finding your way!

Graph Voyager

Hello @spulimi1,

Depending on what you're trying to do using the JavaScript driver should be similar to using any of the other bolt drivers.

Are you trying to return this to an html table with the properties or aliases as the column headers?

Here's a very quick (ugly and brittle) example solution to pull the props out of any node into a table in vanilla-js.

I also recommend you check out the documentation for the js driver, along with the GitHub ReadMe.

    <!-- -->
    <script src=""></script>
      <tr id="header"></tr>
    <tbody id="body"></tbody>
  <script type="text/javascript">
    let header = document.getElementById("header");
    let body = document.getElementById("body");


    async function example() {
      const driver = neo4j.driver(
        neo4j.auth.basic("neo4j", "graph")
      const session = driver.session();
      try {
        const result = await"MATCH (n) RETURN n");

        // Assumes all nodes returned have the same properties as the first one returned.
        Object.keys(result.records[0].get(0).properties).forEach((key) => {
          let colHead = document.createElement("th");
          let headerText = document.createTextNode(key);

        // There are nicer ways to do this. This is just a hacked together example.
        result.records.forEach((record) => {
          let row = document.createElement("tr");
          Object.values(record.get(0).properties).forEach((val) => {
            let cell = document.createElement("td");
            let text = document.createTextNode(val);
      } finally {
        await session.close();
      await driver.close();


I change it to MATCH (n) RETURN and it returns nothing

Nodes 2022
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online