module Yinx module SQL class JsonBatch < ActiveRecord::Base def books batch. map { |note| [note['notebookGuid'], note['book']] }. uniq. map { |id_name| id_name[1] } end def stacks batch. map { |note| note['stack'] }. uniq end def tags batch. map { |note| note['tags'] }. flatten. uniq end end end end