JSFiddle - React, Tailwind, and code Playground

by bryan_weaver

HTML

<div id="data"></div>

JavaScript

//Asynchronous AJAX function to Update a CRM record using OData
var stops = {};
var jsonStops = window.JSON.stringify(stops);

 $.ajax({
    type: "GET",
    contentType: "application/json; charset=utf-8",
    datatype: "json",
     data: jsonStops,
    url:"https://prototypea.mhco-fms.com:5556/xrmservices/2011/OrganizationData.svc/Mhc_ininspstopSet?$select=mhc_propertyid,Mhc_ScheduledAt,Mhc_Unit,mhc_unitdesignatorid,mhc_mhc_propertyrecord_mhc_ininspstop_Propert/Mhc_FullStreetAddress,mhc_mhc_propertyrecord_mhc_ininspstop_Propert/Mhc_ParcelID&$expand=mhc_mhc_propertyrecord_mhc_ininspstop_Propert&$filter=Mhc_AssignedTo eq 'crmtest3 Inspector'",
    beforeSend: function (XMLHttpRequest) {
      //Specifying this header ensures that the results will be returned as JSON.
      XMLHttpRequest.setRequestHeader("Accept", "application/json"); 
    },
    success: function (data, textStatus, XmlHttpRequest) {
           var stops = data.d;
           for (var i in stops) {
              $('#data').text(stops[i].Mhc_ScheduledAt);
           }
    }
  });