Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/env ruby
require 'json'
uniq = File.open("uniq_node.txt").map {|x| x.stip.to_i}
json = JSON.parse(ARGF.read)
json.each do |ary|
read_id = ary.shift
uniq.each do |uniq_id|
size = ary.select { |node_id| node_id == uniq_id }.size
if size > 0
p read_id, uniq_id
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.