If condition-for each loop

Hi all,
I have assign value as
Word=[‘world’,‘new’]
Gettext= “world is beautiful”
With the help of deserilalize JSON array and in for each loop assign value as individual value=item. tostring
Then inside the for each
I have given condition as gettext.contains(individual value)
Then
Message as true
Else
Message as false

I have a question I have to check for both value world and new in same if conditions

How is it possible can any one plz suggest

if (item.ToString().Contains("world") or item.ToString().Contains("new"))

Regards,
Arivu

1 Like

As you suggest in if condition
Individual value.to string(). contains (gettext) or individual value.tostring(). contain (gettext)

Is this the right format

Thanks

Hi @vaishali,

Individual value - inbetween space is there can you correct and send again

Individualvalue.to string(). contains (gettext) or individualvalue.tostring(). contain (gettext)

Space is not there in between…

Thanks

Individualvalue.ToString().contains("world") or individualvalue.ToString().contains("new")

Regrards,
Arivu