JSON query for tags returns distinct list