import QtQuick import QtQuick.Controls import QtQuick.Layouts ApplicationWindow { width: 640 height: 480 visible: true ColumnLayout { anchors.fill: parent Component.onCompleted: { var words = [ "Apple", "Pear", "Orange", "Banana", "Melon", "Dragonfruit" ]; function eFilterArray(currentElement) { return currentElement.includes("e"); } console.log("Array " + words + " length: " + words.filter(eFilterArray)); function eFilterText(currentElement) { return currentElement.text.includes("e"); } var eChildren = children.filter(eFilterText, 0); console.log("Number of fields that contain 'e' in their text: " + eChildren); } Text { text: "Apple" } Text { text: "Pear" } Text { text: "Orange" } Text { text: "Banana" } Text { text: "Melon" } Text { text: "Dragonfruit" } } }