title: Save json file data in to Rails database
body: <p>I have a Rails API using rails 5.2.1 and I'm developing a Web Scraping API that extracts web data using the Mechanize Gem.</p>
  <p>What I'm going to do is, I'm going to pass all of this web scraping data data to React.js but first I need to get this data on my database which I'm having hard time how to figure this out.</p>
  <p>So when I extract my data and I receive it all in a JSON file (called data.json), which I'm stunned I got until here haha.</p>
  <pre><code>{
    &quot;Brazil&quot;:[
    {&quot;Jungle Plants&quot;:[bla bla bla ]},
    {&quot;Desert Plants&quot;:[ bla bla bla ]}],
  
    &quot;Egypt&quot;:[
    {&quot;Jungle Plants&quot;:[bla bla bla ]},
    {&quot;Desert Plants&quot;:[ bla bla bla ]}]
    
    and so on...
  }
  </code></pre>
  <p>So the next thing I need to do is separate my JSON data into my database which I already have a migration setup like this:</p>
  <pre><code>class CreatePlants &lt; ActiveRecord::Migration[5.2]
    def change
      create_table :plants do |t|
        t.string :country_name
        t.string :plant_categories
  
        t.timestamps
      end
    end
  end
  </code></pre>
  <p>So up in the table what I want to is, I want that the country name like 'Brazil' or 'Egypt' or whatever country name is goes to the <strong>country_name</strong> column and so for the <strong>plant_categories</strong>.</p>
  <p>My question is, how can I organize/separate my <code>data.json</code> file in to my database? I will appreciate so much your help! &lt;3</p>