PHPackages                             agallou/array-filter-path - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. agallou/array-filter-path

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

agallou/array-filter-path
=========================

Recursively filter an array uning some json-y syntax

0.0.1(10y ago)021.9k↑260.7%MITPHP

Since Nov 19Pushed 10y ago2 watchersCompare

[ Source](https://github.com/agallou/ArrayFilterPath)[ Packagist](https://packagist.org/packages/agallou/array-filter-path)[ RSS](/packages/agallou-array-filter-path/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (2)Used By (0)

array-filter-path
=================

[](#array-filter-path)

Example
-------

[](#example)

Take for example this array :

```
$baseArray = array(
  'director' => array(
     'first_name' => 'Robert',
     'last_name' => 'Zemeckis',
  ),
  'actors' => array(
    array(
      'first_name' => 'Michael J.',
      'last_name' => 'Fox',
    ),
    array(
      'first_name' => 'Christopher',
      'last_name' => 'Lloyd',
    ),
  ),
  'label' => 'Back to the Future'
);
```

If we filter it like this :

```
use agallou\ArrayFilterPath\ArrayFilterPath as ArrayFilterPath;
$filter = new ArrayFilterPath();
$filters = array(
  'actors[].last_name',
  'label',
);
$filteredArray = $filter->filter($baseArray, $filters);
```

We will get an array like this, with only the actors last name and the label :

```
array(
  'actors' => array(
    array(
      'last_name' => 'Fox',
    ),
    array(
      'last_name' => 'Lloyd',
    ),
  ),
  'label' => 'Back to the Future'
);
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3879d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/320372?v=4)[Adrien Gallou](/maintainers/agallou)[@agallou](https://github.com/agallou)

---

Top Contributors

[![agallou](https://avatars.githubusercontent.com/u/320372?v=4)](https://github.com/agallou "agallou (3 commits)")[![ratibus](https://avatars.githubusercontent.com/u/206991?v=4)](https://github.com/ratibus "ratibus (1 commits)")

### Embed Badge

![Health badge](/badges/agallou-array-filter-path/health.svg)

```
[![Health](https://phpackages.com/badges/agallou-array-filter-path/health.svg)](https://phpackages.com/packages/agallou-array-filter-path)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
