title: writing ndb query to return the entity key along with the entity
body: <p>I have an ndb User model:</p>
  
  <pre><code>class User(ndb.Model):
      active = ndb.BooleanProperty(default=True,required=True)
      email= ndb.StringProperty(required=True)
  </code></pre>
  
  <p>that I call in order to retrieve a JSON file with all my users</p>
  
  <pre><code>@app.route('/get_users')
  @login_required
  def get_user_data():
      users = json.dumps([u.to_dict() for u in User.query().fetch()])
      return users
  </code></pre>
  
  <p>The output return looks like this:</p>
  
  <pre><code>[{"email": "user@email.com"},{"email": "user2@email.com"}....]
  </code></pre>
  
  <p>I would like to pass the ID of each user into the object so I can later on use it to query individual users. Ideally, I want to have an output that looks like this:</p>
  
  <pre><code>[{"email": "user@email.com", "id": xxxxxx},{"email": "user2@email.com", "id": xxxxxx}....]
  </code></pre>
  
  <p>I tried adding the following declaration into my model class:
    id = ndb.KeyProperty()</p>
  
  <p>but I'm getting null values instead of retrieving the actual ID value from the datastore entities.</p>
  
  <p>How do I go about pulling the keys of all users and adding them into the returned objects?</p>