{"ScriptPreparationCode":null,"TestCases":[{"Name":"Filter","Code":"let sockets = [{ conversation: \u00221\u0022},{ conversation: \u00222\u0022}, { conversation: \u00223\u0022}, { conversation: \u00225\u0022}, { conversation: \u00225\u0022} ]\r\n\r\nconst removeWebsocketEntryByConversation = (conversation) =\u003E {\r\n\tsockets = sockets.filter((ele) =\u003E ele.conversation !== conversation);\r\n}\r\nremoveWebsocketEntryByConversation(\u00222\u0022);\r\n","IsDeferred":false},{"Name":"findIndex and splice","Code":"let sockets = [{ conversation: \u00221\u0022},{ conversation: \u00222\u0022}, { conversation: \u00223\u0022}, { conversation: \u00225\u0022}, { conversation: \u00225\u0022} ]\r\n\r\n\r\nconst removeWebsocketEntryByConversation = (conversation) =\u003E {\r\n sockets.splice(sockets.findIndex(v =\u003E v.conversation === conversation), 1);\r\n }\r\nremoveWebsocketEntryByConversation(\u00222\u0022);\r\n\r\n","IsDeferred":false}]}