JSFiddle - React, Tailwind, and code Playground

HTML

<div class="stars-wrapper1">
            <input type="radio" name="newrate" value="1" title="1"  />
            <input type="radio" name="newrate" value="2" title="2"  />
            <input type="radio" name="newrate" value="3" title="3" />
        </div>
<div class="stars-wrapper1">
            <input type="radio" name="newrate" value="1" title="4"  />
            <input type="radio" name="newrate" value="2" title="5"  />
            <input type="radio" name="newrate" value="3" title="6" />
        </div>

JavaScript

$('.stars-wrapper1').each(function() {

  alert($(this).find('input[type=radio]:first').attr('title'));
 });