json.data do json.array! @schools do |d| json.value d.id json.name "#{d.name}-#{d.department&.school&.name.to_s}-#{d.department&.name.to_s}" end end json.count @schools.size json.code 0 json.msg "success"