added functionality to parse json ASTs into Arel query