In my project I have pass String to JavaScript using stringByEvaluatingJavaScript it have passed successfully. But if I have pass JSON String and Array or Dictionary means it doesn't pass the values I don't know how to pass these.
Here I have mention the code I have tried for pass the string to JavaScript,
let param:String = "HI"
let _ = self.webView.stringByEvaluatingJavaScript(from: "myNewFunction('\(param)')")
It Successfully return the value HI
Here I Mentioned the JavaScript Code,
<!DOCTYPE html>
<html>
<p>Click the button to display an alert box.</p>
<script>
function myNewFunction(param) {
alert(param);
}
</script>
<body>
<button onclick="myNewFunction()">Try it</button>
</body>
</html>
How can I pass the values like Array and Dictionary and the JSON String?

