storing JSON data in mysql
arrays, database, json, mysql, ruby-on-rails
Solution
Here is what I found
http://api.rubyonrails.org/classes/ActiveRecord/Base.html
Saving arrays, hashes, and other non-mappable objects in text columns
Problem
I have an organization table for example ``` ID, name, address, phone, email, etc... ``` Now I want to add multiple addresses, phones and emails. Is it a good way to store json data in email column like this ``` [ "address2@example2.com", "address2@example2.com", "address2@example2.com" ] ``` Or create another table just for emails and another for phones etc... If storing json data is better - what is the best way to use it in rails?