Check out example codes for "loopback sql run". It will help you in understanding the concepts better.

Code Example 1

MyModel.dataSource.connector.query(sql, (err, data) => {
    //do somethind with data
});

Learn ReactJs, React Native from akashmittal.com