sorted = snapshots.sort do |a, b|
        s = a['job'].to_s <=> b['job'].to_s
        s = a['index'].to_i <=> b['index'].to_i if s == 0
        s = a['created_at'].to_s <=> b['created_at'].to_s if s == 0
        s