Needed this again and my original solution didn’t work for some reason. I found an easier way using sibling instead of parents.
// field is coming from select2_ajax_data filter,
// so it's the current field.
// Using $input was breaking because select2 puts the actual input outside of the row.
var fields = acf.getFields(
{
key: 'my_field_key',
sibling: field.$el,
}
);
if ( fields ) {
var first = fields.shift();
var value = first ? first.val() : '';
}