I'm opening an URL in UIWbView, where user can enter OTP and after submitting it'll provide following response:
{"success":true,""message":payment success"}
I want that if the value of success is true, I'll remove UIWebView from superview.
I don't know how to read the response from UIWebView.
I tried number of strings as parameter in
stringByEvaluatingJavaScript(from:)but finally I figure it out by passing"document.body.innerHTML".You can use
"document.getElementById('someElement').innerText", if you want to read data from HTML elements/components like text fields, etc.