title: Get first letter for first of multiple surnames in list starting with that letter
body: <p>I have a list of employees for which i have to get the first letter, for the first surname that starts with that letter and add it as data.</p>
  
  <pre><code>                &lt;ul class="org-list" &gt;
                      &lt;li class="org-list-item"&gt;
                          &lt;span class="surname"&gt;AA&lt;/span&gt; &lt;span class="name"&gt;John&lt;/span&gt;
                      &lt;/li&gt;
                      &lt;li class="org-list-item"&gt;
                          &lt;span class="surname"&gt;AB&lt;/span&gt; &lt;span class="name"&gt;John&lt;/span&gt;
                      &lt;/li&gt;
                      &lt;li class="org-list-item"&gt;
                          &lt;span class="surname"&gt;AC&lt;/span&gt; &lt;span class="name"&gt;John&lt;/span&gt;
                      &lt;/li&gt;
                      &lt;li class="org-list-item"&gt;
                          &lt;span class="surname"&gt;BA&lt;/span&gt; &lt;span class="name"&gt;John&lt;/span&gt;
                      &lt;/li&gt;
                      &lt;li class="org-list-item"&gt;
                          &lt;span class="surname"&gt;BB&lt;/span&gt; &lt;span class="name"&gt;John&lt;/span&gt;
                      &lt;/li&gt;
                      &lt;li class="org-list-item"&gt;
                          &lt;span class="surname"&gt;CA&lt;/span&gt; &lt;span class="name"&gt;John&lt;/span&gt;
                      &lt;/li&gt;
                      &lt;li class="org-list-item"&gt;
                          &lt;span class="surname"&gt;CB&lt;/span&gt; &lt;span class="name"&gt;John&lt;/span&gt;
                      &lt;/li&gt;
                      &lt;li class="org-list-item"&gt;
                          &lt;span class="surname"&gt;CC&lt;/span&gt; &lt;span class="name"&gt;John&lt;/span&gt;
                      &lt;/li&gt;
                  &lt;/ul&gt;
  </code></pre>
  
  <p>From this list <code>&lt;li&gt;</code> items that have surnames AA, BA, CA should have a data attribute <code>data-surname="A"</code> or <code>data-surname="B"</code>, <code>data-surname="C"</code></p>
  
  <p>How can i extract those letters and add them as data?</p>
  
  <p>I literally don't know how to start it so i don't have any code to post. Thank you for help.</p>