fix type and use getJSON to avoid cross domain security issue