Returned vertex properties (JS client)

Hi, I've got a question regarding the returned vertex value when using the JS client. How come non-array properties are parsed & returned as an array of length 1, as seen in the example below? Thank you.
{
"id": 4104,
"label": "account",
"properties": {
"createdAt": [
{
"id": { "relationId": "16p-360-1l1" },
"label": "createdAt",
"value": "2024-02-26T22:06:11.873Z",
"key": "createdAt"
}
],
"address": [
{
"id": { "relationId": "1kx-360-2dh" },
"label": "address",
"value": "some_address",
"key": "address"
}
]
}
}
{
"id": 4104,
"label": "account",
"properties": {
"createdAt": [
{
"id": { "relationId": "16p-360-1l1" },
"label": "createdAt",
"value": "2024-02-26T22:06:11.873Z",
"key": "createdAt"
}
],
"address": [
{
"id": { "relationId": "1kx-360-2dh" },
"label": "address",
"value": "some_address",
"key": "address"
}
]
}
}
Solution:
array is used to work with properties whose cardinality list or set gremlin> g.addV('test').property(list,'a','1').property(list,'a','2') ==>v[13] gremlin> g.V(13).valueMap() ==>[a:[1,2]]...
Solution
Valentyn Kahamlyk
Valentyn Kahamlyk83d ago
array is used to work with properties whose cardinality list or set gremlin> g.addV('test').property(list,'a','1').property(list,'a','2') ==>v[13] gremlin> g.V(13).valueMap() ==>[a:[1,2]]
tien
tien83d ago
Thanks, so does this mean that the response doesn't contains information of the cardinality, so that the client library can't intelligently parse it?
Valentyn Kahamlyk
Valentyn Kahamlyk83d ago
Want results from more Discord servers?
Add your server
More Posts
Anyone using Tinkerpop docker as a local Cosmos replacementRunning into some random issues. Looking for tips and tricks.Configuring Websockets connection to pass through a proxy serverHey, I'm working on making G.V() fully proxy aware, but I can't seem to get websockets connection tpython goblin vs spring-data-goblin for interactions with gremlin serverI want an OGM to interact with my gremlin server. What would be a good choice?Is there any open source version of data visualizer for aws neptune?Is there any open source version of data visualizer for aws neptune. I'll need it since it essentialDynamic select within query not working.Any insights or help would be greatly appreciated. I have to pass a list of lists in the format beAdding multiple properties to a vertex using gremlin-goHello Community, I have a question regarding how multiple properties can be added to a vertex using Is it possible to walk 2 different graphs using custom TraversalStrategy in Gremlin?I have 2 different graphs in 2 different Neptune cluster. Both of them can have few reference verticSideEffect a variable, Use it later after BarrierStep?I seek a query that builds a list and then needs to both sum the list's mapped values and divide theMemory issue on repeatI am traversing all nodes occuring in the same cluster given one of the nodes in that cluster. SurpWhich database should i use for my DJ set planning software?Hi, i want to develop a software that lets DJs plan a set (i.e. playlist) and i'm wondering if graph