无法从 javascript 中编写的 orientdb 函数的结果中获取 @rid

not able to fetch @rid from result in orientdb function written in javascript

我在javascript写了orientdb函数。想从结果中访问 @rid 但无法获取 @rid.How 你是否得到了 @rid.Need 的帮助。

var db = orient.getDatabase();
var result = db.query("select from test where testId = ?",testId);
if(result == null){
     response.send(404,"no data found",'text/plain','no data'); 
}else{
     return result;
}

和响应:

[
    {
        "@type": "d",
        "@rid": "#12:52",
        "@version": 1,
        "@class": "test2",
        "me": "Hrishi"
    }
]

现在如何从 json.

中获取 @rid

试试这个代码

result[0].getIdentity().toString();