Answers for "find js like"

0

find js like

const arrBirds = ["Mourning Dove", "Bald Eagle", 'Eurasian Collared-Dove'];

let filtered = arrBirds.filter(arrBirds => arrBirds.includes('ov'));
console.log(filtered);
//Mourning Dove,Eurasian Collared-Dove
Posted by: Guest on October-27-2021
0

find js like

var json = [
  {
    "id": "1",
    "title": "canned 1",
    "message": "selamat pagi apa kabar kak",
    "created_at": "2021-10-27 00:00:00"
  },
  {
    "id": "6",
    "title": "greetomg",
    "message": "selamat pagi apa kabar kak",
    "created_at": "2021-10-27 00:00:00"
  },
  {
    "id": "4",
    "title": "other",
    "message": "W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.\r\n",
    "created_at": "2021-10-27 00:00:00"
  },
  {
    "id": "3",
    "title": "syarat .com",
    "message": ".com tidak memiliki syarta apapaun",
    "created_at": "2021-10-27 00:00:00"
  },
  {
    "id": "2",
    "title": "syarat .id",
    "message": "halo kak berikut syarat domain id",
    "created_at": "2021-10-27 00:00:00"
  },
  {
    "id": "5",
    "title": "syarat .ido",
    "message": "halo kak berikut syarat domain id",
    "created_at": "2021-10-27 00:00:00"
  }
];

let key = "pagi";
let find = json.filter((data) => data.title.includes(key) || data.message.includes(key) );
console.log(find);
Posted by: Guest on October-27-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language