diff --git a/challenges/04-data-visualization/json-apis-and-ajax.json b/challenges/04-data-visualization/json-apis-and-ajax.json
index aa17268d0c..7d2af40824 100644
--- a/challenges/04-data-visualization/json-apis-and-ajax.json
+++ b/challenges/04-data-visualization/json-apis-and-ajax.json
@@ -232,7 +232,7 @@
"assert(code.match(/new\\s+?XMLHttpRequest\\(\\s*?\\)/g), 'message: Your code should create a new XMLHttpRequest
.');",
"assert(code.match(/\\.open\\(\\s*?('|\")GET\\1\\s*?,\\s*?('|\")\\/json\\/cats\\.json\\2\\s*?,\\s*?true\\s*?\\)/g), 'message: Your code should use the open
method to initialize a \"GET\" request to the freeCodeCamp Cat Photo API.');",
"assert(code.match(/\\.send\\(\\s*\\)/g), 'message: Your code should use the send
method to send the request.');",
- "assert(code.match(/\\.onload=function\\(\\s*?\\)\\s*?{/g), 'message: Your code should have an onload
event handler set to a function.');",
+ "assert(code.match(/\\.onload\\s*=\\s*function\\(\\s*?\\)\\s*?{/g), 'message: Your code should have an onload
event handler set to a function.');",
"assert(code.match(/JSON\\.parse\\(.*\\.responseText\\)/g), 'message: Your code should use the JSON.parse
method to parse the responseText
.');",
"assert(code.match(/document\\.getElementsByClassName\\(\\s*?('|\")message\\1\\s*?\\)\\[0\\]\\.innerHTML\\s*?=\\s*?JSON\\.stringify\\(.+?\\)/g), 'message: Your code should get the element with class message
and change its inner HTML to the string of JSON data.');"
],