add utility functions to convert data frame to json arrays.