refactor jsonDataTable javascript into a shared file