title: Filter Array of Objects based on input field in React
body: <p>Got in a rather troublesome situation 
  I have an array of objects </p>
  
  <pre><code>[
     {
       "title":"placeholder",
       "text":"placeholder"
     },
     {
       "title":"test",
       "text":"placeholder"
     },
     {
       "title":"javascript",
       "text":"placeholder"
     }
  ]
  </code></pre>
  
  <p>I am displaying them in a div,but thats not important
  I got an input field which users should type in title's and as they type the array should only show matching object. 
  Inputing java would show the javascript titled object</p>
  
  <p>I need to somehow change the array so it doesnt display anything but the entered title and if the input is empty shows the whole array</p>
  
  <p>I am using React but i can only use hooks
  So i copy the json</p>
  
  <pre><code>var [arrayOfObjects, setArray] = useState(Json)
  </code></pre>
  
  <p>the Json is imported from a local file
  arrayOfNotes is the array that i need to change
  pointing out so its easier to understand </p>
  
  <p>ty in advance</p>