JSFiddle - React, Tailwind, and code Playground
HTML
<div id="plan">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<g id="layer3">
<rect width="105.71429" height="80" x="351.42856" y="152.36218" id="rect1" style="fill:#008000"></rect>
<rect width="120" height="85.714287" x="500" y="389.50504" id="rect2" style="fill:#008000"></rect>
</g>
</svg>
</div>
JavaScript
$(document).ready(function() {
var str = $("#plan #rect1")[0];
alert(str);
})