The output for your API you mentioned isn't really valid JSON. Assuming you want something like this:
{
"option" : [
{ "option" : "object 1" },
{ "option" : "object 2" }
],
"project": [
{ "project" : "object 1" },
{ "project" : "object 2" }
]
}
Then you can implement the API as follows:
exports.get = function(request, response) {
var optionTable = request.service.tables.getTable('option');
var projectTable = request.service.tables.getTable('project');
optionTable.where(function() {
return true; // add any filtering for options here
}).read({
success: function(options) {
projectTable.where(function() {
return true; // add any filtering for projects here
}.read({
success: function(projects) {
var result = { option: options, project: projects };
response.send(200, result);
}
});
}
});
}