PHPackages                             kasperhansen/dot-array-mapper - 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. kasperhansen/dot-array-mapper

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

kasperhansen/dot-array-mapper
=============================

Mapping array data using dot notation.

1.1.0(10mo ago)0288MITPHPPHP &gt;=8.3

Since Aug 7Pushed 10mo agoCompare

[ Source](https://github.com/kasperh90/dot-array-mapper)[ Packagist](https://packagist.org/packages/kasperhansen/dot-array-mapper)[ RSS](/packages/kasperhansen-dot-array-mapper/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

DotArrayMapper
==============

[](#dotarraymapper)

Mapping array data using dot notation.

Installation
============

[](#installation)

```
composer require kasperhansen/dot-array-mapper
```

Usage
=====

[](#usage)

```
use Kasperhansen\DotArrayMapper;

$mapper = new DotArrayMapper();

// Set the data to be mapped
$mapper
    ->setData([
        'user' => [
            'name' => 'John Doe',
            'email' => 'john@doe.com',
            'address' => [
                'city' => 'New York',
            ],
        ],
    ])
    ->map([
        'name' => 'user.name',
        'email' => 'user.email',
        'city' => 'user.address.city',
    ])
    ->addFilter('name', fn($value) => strtoupper($value))
    ->addFilter('email', fn($value) => strtolower($value));

// Extract the mapped data
$mappedData = $mapper->extract();

// Output the mapped data
echo $mappedData['name']; // John Doe
echo $mappedData['email']; // john@doe.com
echo $mappedData['city']; // New York
```

License
=======

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

Contributing
============

[](#contributing)

Contributions are welcome!

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance54

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Every ~3 days

Total

2

Last Release

317d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ca693048a3b062198aaae7cc742dac7decc6a034df0981486466f794f2684e7a?d=identicon)[kasperh90](/maintainers/kasperh90)

---

Top Contributors

[![kasperh90](https://avatars.githubusercontent.com/u/36596298?v=4)](https://github.com/kasperh90 "kasperh90 (3 commits)")

---

Tags

arraymapperdot notation

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kasperhansen-dot-array-mapper/health.svg)

```
[![Health](https://phpackages.com/badges/kasperhansen-dot-array-mapper/health.svg)](https://phpackages.com/packages/kasperhansen-dot-array-mapper)
```

###  Alternatives

[symfony/property-access

Provides functions to read and write from/to an object or array using a simple string notation

2.8k309.5M3.0k](/packages/symfony-property-access)[cuyz/valinor

Dependency free PHP library that helps to map any input into a strongly-typed structure.

1.5k11.7M153](/packages/cuyz-valinor)[league/config

Define configuration arrays with strict schemas and access values with dot notation

565323.7M35](/packages/league-config)[phootwork/lang

Missing PHP language constructs

1227.1M8](/packages/phootwork-lang)[selective/transformer

A strictly typed array transformer with dot-access, fluent interface and filters.

3819.1k1](/packages/selective-transformer)[pharaonic/php-dot-array

Access array data quickly/easily using dot-notation and asterisk.

1011.9k4](/packages/pharaonic-php-dot-array)

PHPackages © 2026

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