Source: site.view [edit]
Function name: getSessionData
Arguments: key
Description:
Page type: webl
Render function:  
Module: sportstreak

Page source:

var db = Wub_GetDB("sportstreak");
var coll = Wub_GetCollection(db, "session");

// Create a DB Object (row) to insert into the collection.
var dbq = Wub_NewDBObject([. key=key .]);

var res = Wub_QueryDB(coll, dbq, 20); // 20 = max results

if Size(res) >= 1 then
   NewPage(WubCall("toJSON", [res[0].data]), "text/html");
else
   NewPage("{}", "text/html");
end;