We no longer need to worry about including JSON files or calling jQuery libraries to make a simple API calls. The platform gives us simple methods to do basic CRUD operations.
Here is a simple example. I used the amazing REST Builder tool to generate the code. The code searches for an email address and returns the full name of the contact record.
The above code works great for a single record, since the ProcessData function gets invoked in the success function of the WebAPI call. When we start to do bulk operations, the code starts executing asynchronously. Here is an example of calling the function multiple times. This code is only for illustrations purposes. If we were to query multiple contact records, our best practice is to batch multiple email addresses into a single WebAPI call.
There are many articles that discusses async/await, but how to applies to Dynamics 365 is not something well covered. I hope this article helps.