check if an object includes substring

PHOTO EMBED

Wed Apr 05 2023 16:03:47 GMT+0000 (Coordinated Universal Time)

Saved by @azcraze #javascript #object #validate #if #string

const person = {
  first_name: "Joan",
  last_name: "Leon",
  twitter: "@nucliweb"
};

Object.values(person)
  .toString()
  .includes("web");
content_copyCOPY

https://codetogo.io/how-to-check-if-object-includes-substring-in-javascript/