title: How to query jsonb array field in Rails 5
body: <p>How to use active record to query an array of jsonb objects </p>
  
  <p>Schema</p>
  
  <pre><code> create_table "routes", force: :cascade do |t|
      t.string "state"
      t.text "address"
      t.bigint "user_id", null: false
      t.jsonb "travel_routes", array: true
      t.datetime "created_at", precision: 6, null: false
      t.datetime "updated_at", precision: 6, null: false
      t.index ["user_id"], name: "index_routes_on_user_id"
    end
  </code></pre>
  
  <p>Rails Console </p>
  
  <pre><code>
  
  travel_routes: [{"to"=&gt;"Yaba Lagos", "fee"=&gt;5000}, {"to"=&gt;"Lagos Iyanapaja", "fee"=&gt;3000}]
  
  
  </code></pre>