pass json object to javascript