title: Passing json object in href function - JavaScript
body: <p>I need to pass a json object to function, which is as mentioned below in a href, but this JS code is not getting evaluated. So can anyone suggest a workaroud or a solution for this?</p>
  
  <pre><code>function function_test(option,jsonObj){
     displayMessage(str);
  }
  
  function function_prepare_div(){   
    var str ="";
    var jsonResposneObj = getJson();//function to get jsonResponseObj
    for(i=0;i&lt;jsonResponseObj.length;i++){
      str += "&lt;a href='function_test( " + i + "," + jsonResposneObj.dataObj[i] +")'&gt;1. " + jsonResposneObj.dataObj[i].objName + "&lt;/a&gt;&lt;/br&gt;";
    }  
      return str;
  }
  </code></pre>
  
  <p>P.S. I cannot return the jsonResponse after function call.</p>