Check if String Contains a Substring with script

Hi @Sebastian,
Please kindly help with below using squidex cloud, here I tried to check is a field contains some substrings to then update/create a reference field with the id.

image
I get this error: * Failed to execute script with Javascript error: Object has no method 'includes'.

Hey,

it is is javascript, so you have to use indexOf: https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf