Adding IDs to results object for AJAX pagination