Example showing an ajax call with JSON. Based on http://bit.ly/Y4psE8