title: Vue. How to get a value of a "key" attribute in created element
body: <p>I am trying to create a component and get its <code>:key</code> for using in axios.</p>
  <p>The element is created, but I can't get a key. It's undefined.</p>
  <pre class="lang-html prettyprint-override"><code>    &lt;div class=&quot;container&quot; id=&quot;root&quot;&gt;
          &lt;paddock is=&quot;paddock-item&quot; v-for=&quot;paddock in paddocks&quot; :key=&quot;paddock.key&quot; class=&quot;paddock&quot;&gt;
          &lt;/paddock&gt;
      &lt;/div&gt;
      &lt;script&gt;
      var pItem = {
          props: ['key'],
          template: '&lt;div :test=&quot;key&quot;&gt;&lt;/div&gt;',
          created: function() {
              console.log(key);
          }
          };
      new Vue({
          el: '#root',
          components: {
              'paddock-item': pItem
          },
          data: {
              paddocks: [
                  {key: 1},
                  {key: 2},
                  {key: 3},
                  {key: 4}
              ]
          }
      })
      &lt;/script&gt;
  </code></pre>
  <p>I tried some variants, but no result. <code>key</code> was empty.</p>