• Copy the code provided below.
• Log in to the NTA site and click on "Challenge Answer Key" to open the answer key page.
• Open Developer Tools in your browser by pressing F12
.
• Go to the Console tab and paste the copied code.
• If you are unable to paste, type "allow pasting"
in the console and try again.
• Send me the output you got on Reddit (u/Novadrone16) OR mail me at novadrone16@tutamail.com (Remember to add correct shift in subject).
(function() {
let result = {};
document.querySelectorAll("tbody tr").forEach(row => {
let questionIdElement = row.querySelector("[id*=\"lbl_QuestionNo\"]");
let optionIdElement = row.querySelector("[id*=\"lbl_RAnswer\"]");
if (questionIdElement && optionIdElement) {
let questionId = questionIdElement.textContent.trim();
let optionId = optionIdElement.textContent.trim();
if (questionId && optionId) {
result[questionId] = optionId;
}
}
});
console.log(JSON.stringify(result, null, 4));
})();