I have the model Job and Job model have field additional_data. Here additional_data column is stored as json data type and have field like "priority". I want to order jobs table entries based on additional_data's "priority" field value. I have code like following but it's not working. I need to order using ORM not by raw sql.
@jobs = Job.all.order('additional_data['priority'] asc')