adding function to create JSON object for vis with transitions