update the example to remove closure dependencies such as xhr and json, thanks for the feedback @elemoine @twpayne and @fredj