it would be good if you start with CRM webapi - it should be quick and easy.
Basically if you need retrieve contacts and select some field from it you would do it like below :
var req = new XMLHttpRequest();
req.open("GET", Xrm.Page.context.getClientUrl() + "/api/data/v8.1/contacts?$select=fullname,jobtitle", true);
req.setRequestHeader("OData-MaxVersion", "4.0");
req.setRequestHeader("OData-Version", "4.0");
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.setRequestHeader("Prefer", "odata.include-annotations=\"*\"");
req.onreadystatechange = function() {
if (this.readyState === 4) {
req.onreadystatechange = null;
if (this.status === 200) {
var results = JSON.parse(this.response);
for (var i = 0; i < results.value.length; i++) {
var fullname = results.value[i]["fullname"];
var jobtitle = results.value[i]["jobtitle"];
}
} else {
Xrm.Utility.alertDialog(this.statusText);
}
}
};
req.send();
you can tell me what exactly the data you need from CRM , the exact criteria , i will help you with the script.
mark my answer a verified if helpful.