Uncaught TypeError: Cannot read property ‘search’ of undefined
at Object.success (main.js:30)
at u (jquery-3.3.1.min.js:2)
at Object.fireWith [as resolveWith] (jquery-3.3.1.min.js:2)
at k (jquery-3.3.1.min.js:2)
at HTMLScriptElement.n (jquery-3.3.1.min.js:2)
at HTMLScriptElement.dispatch (jquery-3.3.1.min.js:2)
at HTMLScriptElement.y.handle (jquery-3.3.1.min.js:2)
It may be from the fact that data.query does not have a property search[1].
Can you share the codepen link to see exactly what you get into the console when you console.log(data)?
The error says “Uncaught TypeError: Cannot read property ‘search’ of undefined”. probably there is no property called search. check console.log for data to confirm the properties to tap on.