Inner join in appery.io
i need to fetch data from two tables on the basis :
i have two tables "questions" and "answers" and i need to show number of answers per question on the ui screen (one to many relation);
i had tried the following:
1) i had invoked this
// Get the user with a given username from the database
var XHRResponse = XHR.send("GET", "{database_url}/collections/AnswersComments", {
Code: Select all
"parameters": {
"where": '{"pid._id": "54d49a56e4b0cc014944f74a"}'
} });
from the service("questions_list_service" success event) .
2) called this service ("answer_list_service" before send event )on "page show" and "page load " events
i also need to make a "ul", " li" view for questions and it answers on the same screen on page load