JSFiddle - React, Tailwind, and code Playground

HTML

<div id="main">
<input type="hidden" id="people_0_1_0" value="12"/>
<input type="hidden" id="people_0_1_1" value="12"/>
</div>

JavaScript

var myArray = $('#main input').map(function(){
   return $(this).val();
}).get();
alert(myArray);