Return data to js