Add data method to retrive data as JSON