For example lets take a string {"hello":"world"}
and another string {"hi":"hello"}
I want to search for the hello in the first string that is before the colon(:)
but my code is finding and returning the string which has the specified queried string but not the string which has the queried string only before colon, i.e., the left hand side part
here the list contains list of strings
for(int i = 0; i < list.size; i++)
{
if(list.get(i).contains(query))
list.remove(i);
}
that means it is finding the first appearing string which has the specified query but not the string until the specified character