小编Kor*_*ike的帖子

如果对象中的一个元素包含字符串,则 Javascript 从数组中删除对象

我有一个对象数组,例如:

{
    "value": [
        {
            "attachment_text": "Support: hello there! I need some help syncing records",
            "ticket_text": "Ticket 1537 from ronburgundy@news.com"
        },
        {
            "attachment_text": "Copied from original request - 401 unathorized",
            "ticket_text": "Ticket 1459 from klaus.kinsky@kinsky.com"
        },
        {
            "attachment_text": "Contact request form received",
            "ticket_text": "Ticket 1173 from sophia@copolla.com"
        },
        {
            "attachment_text": "Hello, we need to troubleshoot some problems",
            "ticket_text": "Ticket 1591 from pat@pending.com"
        },
        {
            "attachment_text": "Contact request form received",
            "ticket_text": "Ticket 1483 from bugs@bunny.com"
        },
        {
            "attachment_text": "Contact request form …
Run Code Online (Sandbox Code Playgroud)

javascript regex arrays object

-1
推荐指数
1
解决办法
84
查看次数

标签 统计

arrays ×1

javascript ×1

object ×1

regex ×1