I am trying to check whether string contain specific given sentence in string or not. I have below string in that I want to check 'already registered' sentence present or not however string is contain array so I couldn't get.
message = 'User error fabric-ca request register failed with errors [[{"code":0,"message":"Registration of \'yandgsub15\' failed: Identity \'yandgsub15\' is already registered"}]]' }
I tried below function, however I couldn't get it though it. please anybody have solution?
var n = error.includes("registered");
errortomessage.var n = message.includes("registered");