code to parse and store tweets in JSON