Couldn't find a less confusing title but here is the pseudo-code:
for all video['tags'][i] in video['tags'][3..-1]
topic = video['tags'][i]
topic_array += video['id']
end
Let's say there are 2 elements in the video['tags'][3..-1]:
video['tags'][3..-1] # => ["Health", "Politics"]
video['id'] # => 35
I want to add the integer 35 to two different arrays named Health and Politics. Those arrays may or may not exist beforehand.
End result example:
Health # => [21, 25, 35]
Politics # => [35]