Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我想收集所有 bookName 如下:
x = g.V.has("books").bookName
它显示输出为:
=>Groovy =>Java =>Oracle
..
我想通过以下方式从上面创建一个列表:
x = ["Groovy","Java","Oracle"]
如何创建上述列表以便我可以进一步迭代列表?
您可以使用 toList() 方法,因此您的查询变为:
x = g.V.has("books").bookName.toList()