I'm trying to make a search engine in my android app. It would be something like this. I get the data in a json:
{
"naturaleza": [
{
"especie": "flores",
"array_tipo": [
{
"tipo": "rosa",
"texto": "Las rosas son flores muy lindad. Representan el amor y la amistad para muchas personas."
},
{
"tipo": "tulipan",
"texto": "Los tulipanes son muy gustados por las personas. Los amantes los utilizan para seducir"
},
{
"tipo": "margarita",
"texto": "Laa margaritas son flores que huelen muy bien. Son pequeñas y adorman muchos jardines."
}
]
},
{
"especie": "animales",
"array_tipo": [
{
"tipo": "leon",
"texto": "El leon es le rey de la selva, es un animal muy fuerte y grane. Todos los demas animales le tiene miedo."
},
{
"tipo": "tiburon",
"texto": "El tiburon es el rey del mar. Nada muy rapido y es muy furte."
},
{
"tipo": "perro",
"texto": "El perro es el mejor amigo del hombre. Es parte de la familia, los niños los quieren mucho"
}
]
}
]
}
As you can see I have an array nature that has two elements (flowers and animals) that are array and at the same time each one has three elements more ...
Now, I want that when looking for the word "king" I am debunked by the position where it is located in the json, that is (position 1 in array nature, position 0 in array animals). It would be something like, when a word is written in the search bar in a listview it shows me the possible results:
the lion is the king of the jungle, it is an animal (1.0)
the shark is the king of the sea. Nothing very (1,1)
and when you select one this has saved its positions to be able to locate them in the json ..... If someone can help me ... thanks in advance ...