Automagically generate JSON data for DataTable plugin