finally learned how to query es and output result to dom