title: Rails json data type
body: <p>I have a model with a field of type json</p>
  
  <pre><code>class Bank &lt; ApplicationRecord
  end
  </code></pre>
  
  <p>Quite simply I wish to be able to record the balances of various currencies in the currencies field. i.e.</p>
  
  <pre><code>Bank.first.update(currencies: {usd =&gt; 100}) #usd=100
  Bank.first.currencies #{"usd" =&gt; "100"}
  </code></pre>
  
  <p>This works for a single currency however when I wish to add a second it overwrites the first:</p>
  
  <pre><code>Bank.first.update(currencies: {gbp =&gt; 1000}) #gbp=1000
  Bank.first.currencies #{"gbp" =&gt; "1000"}
  </code></pre>