I'm trying to get all the nodes and it's properties with gremlin and js that has a specific label.
It should output something like:
[
{
p1:v1,
p2:v2,
px:vx
},
{
p1:v1,
p2:v2,
px:vx
}
]
I tried a million things now, but I think it's supposed to work with:
g.V().hasLabel("myLabel").valueMap();
or
g.V().hasLabel("myLabel").map(p.valueMap()).toList();
But both of them returns
[
{},
{}
]
Which I don't understand, because if I do this:
g.V().hasLabel("myLabel").map(p.values().fold()).toList();
I got a list like I want but only with the values.