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.

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


it is is javascript, so you have to use indexOf: