Setup:
Table “Favorite” which consists of two relation fields: “user” and “product”.
I want to get a list of all products where user.username = ‘userme’;
I can get the results using:
var query = new Backendless.DataQuery();
query.options = {relations:["product"]};
query.condition = "user.username = 'userme'";
var resultCollection = Backendless.Persistence.of( "Favorite" ).find( query );
console.log(resultCollection);
However this returns an array of objects which refer to the product: [{ product : PRODUCT }, …].
My question: is it possible to simply get an array of products: [PRODUCT, PRODUCT], and if so how?