title: how to add another value to the existing JSON object in ruby on rails and Javascript?
body: <p>In the <code>model</code> i have like,</p>
  
  <pre><code>  def question_hash_string
      @question_hash_string || '{}'
    end
  
    def question_hash
      ActiveSupport::JSON.decode question_hash_string
    end
  </code></pre>
  
  <p>In the <code>Javascript</code>,</p>
  
  <pre><code>var question_hash_element = document.getElementById('enr_rds_batch_update_question_hash_string');
  var question_hash = JSON.parse(question_hash_element.value);
  
  question_hash[batch_question_id] = (batch_answer_id || batch_rdsap_answer || batch_answer_checkbox);
  question_hash_element.value = JSON.stringify(question_hash);
  </code></pre>
  
  <p>It would give the values like <code>"{"16":"3","28":false}"</code></p>
  
  <p>I want to add another value with the answer like the following,</p>
  
  <pre><code>question_hash[batch_question_id] = ((batch_answer_id || batch_rdsap_answer || batch_answer_checkbox) &amp;&amp; (build_id));
  </code></pre>
  
  <p><code>"{"16":"3","28":false:"2", "3":"55":"54"}"</code> and so on. I need to add another column with the existing record with ':'. </p>