title: How to run javascript in android and pass in a map as argument
body: <p>I'm trying to run javascript in android and found out Rhino and Duktape provides the functionality to run without a WebView.
  But it seems like neither of them have a clear way of passing a variable number of key-value pairs as argument into my js function. 
  The argument would look like:</p>
  
  <pre><code>{"device":"android", "version":"4.4", "country":"US",...}
  </code></pre>
  
  <p>and the js side would look like</p>
  
  <pre><code>function calculate(param) {
      var country = 'country';
      var device = 'device';
  
      if (country in param &amp;&amp; param[country]=='US') {
          return "a";
      }; 
      if (device in param &amp;&amp; param[device]=="android") {
          return "b";
      } else {
          return "c";
      }
  }
  </code></pre>
  
  <p>Is there any workaround?</p>