How to cast String value to Integer type in gremlin console with AWS Neptune GDB. I'm having the property 'age' with the string value, which needs to be converted to Integer type for math operations in the query. all suggestions are appreciated.
I tried below queries suggested by kelvin.But got these exceptions.
gremlin> g.V(1).values('age').map{(String)it}.next()
Script336735.groovy: 1: [Static type checking] - Inconvertible types:cannot cast org.apache.tinkerpop.gremlin.process.traversal.Traverser <E2 extends java.lang.Object> to java.lang.String
gremlin> g.V(1).values('age').map{(Integer)it}.next()
Script336963.groovy: 1: [Static type checking] - Inconvertible types: cannot cast org.apache.tinkerpop.gremlin.process.traversal.Traverser <E2 extends java.lang.Object> to java.lang.Integer
My requirement is to cast String value to Integer/long