App-Open-Source-per-iPhone-.../.github/osia_helper.rb

11 lines
172 B
Ruby

require 'json'
FILE = 'contents.json'
def get_json
JSON.parse(File.read FILE)
end
def osia_allowed_categories(c)
c.sort_by { |h| h['title']}.map { |x| x['id']}
end