Events querys to json