Find and Highlight Search Results

For real-time search features, it’s a nice feedback to highlight the matches to the given keywords. With this one-liner, it’s easy to find and wrap the results.

This solution works with one result at the same time. That means you need to run it on every result what you retrieved, for example from your back-end API.