title: Passing json object from Android/iOS native to javascript
body: <p>Is there any way to pass JSONObject from android to javascript. We are using WebView.evaluateJavascript mehtod and are able to send only String type object. In JS if we are checking the method paramter;s typeof(data) then it is displaying as string but in iOS it displays typeof(data) as OBJECT.</p>
  
  <p>In both android and iOS we are passing String and NSString.</p>
  
  <p>JS method is:</p>
  
  <pre><code>   response: function(id, err, data) {
          var dataObj;
          if(typeof(data) == 'string' ){
              dataObj  = JSON.parse(data || '{}');
          }
    }
  </code></pre>
  
  <p>Android call:</p>
  
  <pre><code>String responseStr = "{\"ok\":\"ok\"}";
  String nativeToWebMethod = "javascript:window.nativeService.response("1",'','"+responseStr+"')";
  webView.evaluateJavascript(nativeToWebMethod, null);
  </code></pre>