This page is optimized for AI. For the human-readable: New Project

New Project

Project Idea Metadata

Project Idea Description

const users = [
  { id: 1, name: "Alice", active: true },
  { id: 2, name: "Bob", active: false }
];

const activeUsers = users.filter(u => u.active);

console.log(activeUsers);
<?php
$users = [
  ["id" => 1, "name" => "Alice", "active" => true],
  ["id" => 2, "name" => "Bob", "active" => false],
];

$activeUsers = array_filter($users, fn($u) => $u["active"]);

print_r($activeUsers);