I am trying to retrieve the Tree hierarchy structure from AWS Neptune DB. i am using the below query to retrieve the data in JSON format
g.V().hasLabel(labelid.toLowerCase()).has("name", "Val oswalt").repeat(__.inE().outV()).emit()
.tree().by(__.valueMap("name")).toList();
this returns me data in the below json format.
[
{
"{name=[Val oswalt]}": {
"{}": {
"{name=[Stan Polomoski]}": {
"{}": {
"{name=[MC Regan]}": {}
}
}
}
}
}
]
Is it possible to return the data in a proper json format or a Flare json format something like below
{
"name": "Val oswalt",
"children": [
{
"name": "Stan Polomoski",
"children": [
{
"name": "MC Regan"
}
]
}
]
}