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 [email protected]"
},
{
"attachment_text": "Copied from original request - 401 unathorized",
"ticket_text": "Ticket 1459 from [email protected]"
},
{
"attachment_text": "Contact request form received",
"ticket_text": "Ticket 1173 from [email protected]"
},
{
"attachment_text": "Hello, we need to troubleshoot some problems",
"ticket_text": "Ticket 1591 from [email protected]"
},
{
"attachment_text": "Contact request form received",
"ticket_text": "Ticket 1483 from [email protected]"
},
{
"attachment_text": "Contact request form received",
"ticket_text": "Ticket 1393 from [email protected]"
}
]
}
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)