Able to pass appointment objects to javascript