# Searching in array with objects

**URL:** <https://forum.kirupa.com/t/searching-in-array-with-objects/182133>\
**Category:** flash\
**Created:** [March 15, 2006, 6:49pm UTC](https://forum.kirupa.com/t/searching-in-array-with-objects/182133 "2006-03-15T18:49:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Poco](https://avatars.discourse-cdn.com/v4/letter/p/53a042/32.png) [@Poco](https://forum.kirupa.com/u/Poco)\
**Post date:** [March 15, 2006, 6:49pm UTC](https://forum.kirupa.com/t/searching-in-array-with-objects/182133/1 "2006-03-15T18:49:17Z")

</div>

Hello everybody,  
Let’s say I have some objects:

```auto

 var apple = new Object(); 
 apple.taste = "acid"; 
 apple.color = "red"; 
  
 var berry = new Object(); 
 apple.taste = "acid"; 
 apple.color = "purple"; 
  
 //more fruits 
  
 var myArray = new Array(apple, berry, fruit1, fruit2, ...)

```

Does anybody have an idea how to search the strings in the array? Let’s say the user types “ci” to the search field, searching in “taste” (it would be marked). Now it should return the objects which have the string “ci” in the taste, as:  
apple - acid - red  
berry - acid - purple  
…

I would really appreciate any ideas, advices, tutorials, codes, simply ANYTHING! Thanks a lot!

Poco
