<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div>Hi Guys,</div><div><br></div><div>I am using the ndb_mongodb module, and Im just trying to return values from the dispatcher table, in particular the setid of a particular entry depending on its attrs value.</div><div><br></div><div>If I query using mongodb shell command it works fine, here I enter test.com and it returns only the setid value, or 2;</div><div><br></div><div>db.dispatcher.find( { attrs: "test.com" }, { setid: 1, _id: 0 } )</div><div>{ "setid" : 2 }</div><div><br></div><div><br></div><div>However I have been having issues getting this to work using mongodb_find_one, as I would of thought the following route return the same;</div><div><br></div><div>if(mongodb_find_one("ml-mongodb", "kamailiosbc", "dispatcher", "{ \"attrs\" : \"test.com\" },{ \"setid\": \"1\", \"_id\": \"0\" }", "mgr1"))</div><div><br></div><div>However it returns all the entries relating to that attrs columm from dispatcher table, instead of just setid.</div><div><br></div><div>Is it possible to do this? I  am stuggling to find the json format to acheive the same thing.</div><div><br></div><div>Also in terms of the mgr1 response, I see its contained within the <span style="background-color: rgb(255, 255, 255); font-family: Helvetica, Arial; font-size: 12px; text-align: justify;"> </span><span style="background-color: rgb(255, 255, 255); font-family: Helvetica, Arial; font-size: 12px; text-align: justify;">$mongodb(key), can I drill down to get specific fields from it or would I need to use transformations or jansson to do this?</span></div><div><br></div><div>Many thanks</div><div><br></div><div>Jon</div>                                          </div></body>
</html>