I have an array of objects such as:
{
"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 received",
"ticket_text": "Ticket 1393 from elmer@fudd.com"
}
]
}
What javascript can I use to remove any objects where the attachment_text field contains the string "Contact request"?
Preferably pure javascript (i.e. not a library such as lodash)