fixed json embedding in api to work with the datatables