Passing several values with Web View String

Friends I need to pass several values ​​to a JS, for that I’m using the WebViewString of the WebView component but I’m having difficulties.
The procedure with only one value I am carrying out smoothly.

How do I send these values ​​and then how do I receive them in JS?
And likewise, how do I send different values ​​from JS to WebView and then separate?

Simple json.
Send value in key and value pair like
{“Hello”,“world”}.
And on js receive this via getWebViewStirng then parse this using var a= JSON.parse(getWebViewStirng).
So you use a.hello or to get value world.
Other option is join all string with some unique set of characters like #$# and more and spit on js with same characters.
Eg. One#$#two
On js
var data is your webViewString you received
var a = data.split("#$#")
var a is an array

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.