refactored jsonToDataTables