<textarea id="textarea"></textarea>
<div id="found"></div>
<script>
let data = [
{ name: "Вася", age: "23" },
{ name: "Игорь", age: "25" }
];
let textarea = document.getElementById('textarea')
let found = document.getElementById('found')
let filter = (fields, value) => data.filter(item => fields.some(field => item[field].includes(value)))
textarea.addEventListener('input', (e) => found.innerText = JSON.stringify(filter(['age', 'name'], e.target.value)))
</script>