The JSON result response doesn't contain the results count, as in
SXA search result component request-response, I need this count for pagination, Is there is any
OOB solution for this.
No, you won't get the results count in JSON Results response. Search Results and JSON Results responses are completely different things.
In order to do that, you would need to make some modifications to
RenderJsonVariantList method in
- copy the JSON Results rendering and provide your own view
- create your own extension method (modification of
RenderJsonVariantListmethod) and use in on that view (you will know where when you will investigate original view)
- in your extension method modify the output of the
IJsonRendererFactoryand add additional results count property to the JSON object