JSFiddle - React, Tailwind, and code Playground

HTML

<input type='text' name='foo[bar]'>

JavaScript

$(document.body).append('1.4.4: ' + $(':input[name$=[bar]]').length);