Skip to content

ResultSet parse to Tree Struct #101

@dwgeneral

Description

@dwgeneral

I have some entities in my graph, such as Device which is own of an Organization, Software which is installed on a Device, etc

Screen Shot 2021-01-13 at 3 14 17 PM
Screen Shot 2021-01-13 at 2 56 35 PM

when I query by "MATCH p = (o:Organization) - [*] - (s) return o as primary, s as target, nodes(p) as nodes, relationships(p) as edges' cypher sql,

finally, I want to get a tree struct like this, maybe like graphQL result.

GraphNode: {
	id: "org1",
	label: "Organization",
	property: {
		name: 'apple',
                 ...
	},
	children: [
	        GraphNode2,
		{
                    id: "dev01",
                    label: "Device",
                    property: {
                       name: 'dev01',
                       .....
                   }
                   children: [
                        GraphNode4
                   ]
                }
              ....
	]
}

does anyone have same work? or some suggestions? thx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions