This will probably be an easy one for most of you, but I’m very inexperienced with Mongo queries. Can someone please tell me what is wrong with this query syntax and how to fix it?
[lua]
local function gettingRequests(event)
if not event.error then
print("NumberRequests = "…#event.result)
print("My Request Status = "…event.result[1].status)
print("My Request Status = "…event.result[2].status)
end
end
local queryTable = {
[“where”] = {
["$or"] = {
{newFriendObjectId = { ["$eq"] = globals.userId } },
{requesterObjectId = { ["$eq"] = globals.userId } }
}
}
}
coronium:getObjects( “FriendRequests”, queryTable, gettingRequests )
[/lua]