I'm trying to add/update vertex and unknown number of properties using gremlin in java to janusgraph.
found an answer to add vertex here https://stackoverflow.com/a/56605921 couldnt convert this to work for add/update vertex.
i'm currently using this solution
g.V().has("vertexname", vertexname).fold().coalesce(__.unfold(), __.addV(label)).property("property1", property1value).property("property2", property2value).next();
However this doesnt work with unknown number of properties.
Is there a way i can combine the solution here https://stackoverflow.com/a/56605921 with what i'm using to work for add/update vertex with unknown number of properties?