I want to check if a string includes another one from b.
a = "some variable value"
b = ["foo", "bar"]
c = a.includes(b)
How should I do it?
It's not really clear what you're asking, so if you want to check if the elements in your array are part of the text in your variable a, you will need to iterate over b to validate if each element is in the string of a like this:
a = "some variable value foo"
b = ["foo", "bar"]
b.forEach(x => {
console.log(`The text '${x}' is in the text '${a}': ${a.includes(x)}`);
})
ais something like{"hello": "world", "d": ["foo", "bar"]}?bis contained in the stringa?