I'm trying to order by a jsonb column in rails using:
Stat.order("data ->'likes'->'followed_by' ASC")
I keep getting this error returned.
PG::UndefinedFunction: ERROR: could not identify an ordering operator for type json
I can't figure out is it my formatting? The followed_by attribute is a int.
Thank you!