Updated document list mapper with function to get documents as objects in array