JSFiddle - React, Tailwind, and code Playground

HTML

<p>next row is <strong>hide</strong></p>
<div id="rollNumber" class="row">
     <label class="col-sm-offset-2 col-sm-3 control-label"></label>
     <div class="col-sm-2 form-control-static">hide</div>
</div>
<p>next row is <strong>show</strong></p>
<div id="rollNumber" class="row">
     <label class="col-sm-offset-2 col-sm-3 control-label">show</label>
     <div class="col-sm-2 form-control-static"></div>
</div>
<p>next row is <strong>show</strong></p>
<div id="rollNumber" class="row">
     <label class="col-sm-offset-2 col-sm-3 control-label">show</label>
     <div class="col-sm-2 form-control-static"></div>
</div>

JavaScript

$(function() {
    $(".row").each(function() {
        if ($("label", this).text() == "" ) {
            $(this).hide();
        }
    });
});