title: jQuery Ajax: get specific object value
body: <p>I'm accessing a dictionary REST API using Ajax. </p>
  
  <pre><code>$.ajax({
    url: "http://api.wordnik.com//v4/word.json/cat/definitions?api_key=mykey&amp;includeRelated=false&amp;includeTags=false&amp;limit=1",
    dataType : 'json',
    success: function(data) {
      //called when successful
      alert(data.word);
    },
    error: function(e) {
      //called when there is an error
      console.log(e.message);
    }
  });
  </code></pre>
  
  <p>The response:</p>
  
  <pre><code>[
    {
      "textProns": [],
      "sourceDictionary": "ahd-legacy",
      "exampleUses": [],
      "relatedWords": [],
      "labels": [],
      "citations": [],
      "word": "cat",
      "text": "A small carnivorous mammal (Felis catus or F. domesticus) domesticated since early times as a catcher of rats and mice and as a pet and existing in several distinctive breeds and varieties.",
      "sequence": "0",
      "score": 0.0,
      "partOfSpeech": "noun",
      "attributionText": "from The American Heritage® Dictionary of the English Language, 4th Edition"
    }
  ]
  </code></pre>
  
  <p>In my test example I get an alert <code>undefined</code> on success. Most Ajax examples I saw use loops but I'm returning one result. How can I extract the <code>word</code> and <code>text</code> values from the objects?</p>