gremlin - how to create a list of string using groovy -
suppose want collect bookname follows:
x = g.v.has("books").bookname
it shows outpuat :
=>groovy =>java =>oracle
..
i want create list above in following manner :
x = ["groovy","java","oracle"]
how create above list can iterate list further ?
you can use tolist() method, query becomes:
x = g.v.has("books").bookname.tolist()
Comments
Post a Comment