Skip to content

Instantly share code, notes, and snippets.

@erikreyna
Last active February 12, 2019 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikreyna/6272b72b291f2e0df207fdc1743b0531 to your computer and use it in GitHub Desktop.
Save erikreyna/6272b72b291f2e0df207fdc1743b0531 to your computer and use it in GitHub Desktop.
const data = {
"metafields":[
{
"id":5994805788772,
"namespace":"global",
"key":"Event-Date",
"value":"1549256400",
"value_type":"string",
"description":null,
"owner_id":15977611364,
"created_at":"2019-02-06T18:31:44-05:00",
"updated_at":"2019-02-06T18:31:44-05:00",
"owner_resource":"article"
},
{
"id":5994805821540,
"namespace":"global",
"key":"Event-Time",
"value":"6:00pm - 8:00pm",
"value_type":"string",
"description":null,
"owner_id":15977611364,
"created_at":"2019-02-06T18:31:45-05:00",
"updated_at":"2019-02-06T18:31:45-05:00",
"owner_resource":"article"
},
{
"id":6010564542564,
"namespace":"global",
"key":"Location",
"value":"18th Street Location",
"value_type":"string",
"description":null,
"owner_id":15977611364,
"created_at":"2019-02-07T13:16:05-05:00",
"updated_at":"2019-02-07T14:05:08-05:00",
"owner_resource":"article"
}
]
};
const filteredResults = data.metafields.filter(item => item.key !== "Event-Date");
console.log(filteredResults);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment