While using the Display templates for Content Search Web part, we may need to access the whole result set at once. I faced a similar scenario where I needed the Results as whole and group them based on a Managed Property.
Normally if you open the out of the box Item Template you can see in a number of Places ctx.CurrentItem which gives you access to the current Item and all of its Properties.
var line1 = $getItemValue(ctx, "Line 1");
var line2 = $getItemValue(ctx, "Line 2");
var pictureURL = $getItemValue(ctx, "Picture URL");
var pictureId = encodedId + "picture";
var pictureMarkup = Srch.ContentBySearch.getPictureMarkup(pictureURL, 468, 220, <span style="background-color: #ffff00;">ctx.CurrentItem</span>, "cbs-largePictureImg", line1, pictureId);
As I Mentioned I wanted all the Results not just the Current Item, The below Single Line of code can give you access to that in JSON Format
var Results = ctx.ListData.ResultTables.ResultRows;
That’s it and you are good to go and on your way to create great search experience for the Users.