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"
      }
    ]
  }
}
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]]
Was this page helpful?