Here is a snippet that works for me (I'm not showing all the connection setup pieces)
const { t,order,cardinality,column,scope,pop,operator,P,traversal } = gremlin.process;
async function runTests() {
try {
let trv= g.V('3');
trv = trv.valueMap(true);
const result = await trv.next();
console.log(result);
console.log(result.value.size);
console.log(result.value.get('code'));
console.log(result.value.get(t.id));
} catch(e) {
console.error(`Something went wrong:\n ${e}`);
} finally {
await connection.close();
}
}when run this yields
{ value:
Map {
'country' => [ 'US' ],
'code' => [ 'AUS' ],
'longest' => [ 12250 ],
'city' => [ 'Austin' ],
EnumValue { typeName: 'T', elementName: 'id' } => '3',
'lon' => [ -97.6698989868164 ],
'type' => [ 'airport' ],
EnumValue { typeName: 'T', elementName: 'label' } => 'airport',
'elev' => [ 542 ],
'icao' => [ 'KAUS' ],
'runways' => [ 2 ],
'region' => [ 'US-TX' ],
'lat' => [ 30.1944999694824 ],
'desc' => [ 'Austin Bergstrom International Airport' ] },
done: false }
14
[ 'AUS' ]
3