asia_database/combined_departs.rb

7 lines
389 B
Ruby
Raw Normal View History

2023-05-26 14:17:05 +00:00
asia_teachers = JSON.parse(File.read('asia_teachers.json'))
asia_academies = JSON.parse(File.read('asia_academies.json'))
asia_depart_teachers = asia_academies.map do |academy, departs_info|
[academy, departs_info.map{|depart_name, url| [depart_name, asia_teachers[url].to_a] }.to_h ]
end.to_h
File.open('asia_depart_teachers.json', 'w+'){|f| f.write(asia_depart_teachers.to_json)}