Does not assume key-value pairs are in same order

Script now merges JSON items with different key names. It will check all
keys of all items before converting to CSV. Before this update, the
script assumed all JSON items contained the same keys, and assumed the
keys were all in the same order.