PHPackages                             alrik11es/object-dot-notation - 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. alrik11es/object-dot-notation

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

alrik11es/object-dot-notation
=============================

Object dot notation for PHP with key existence validation

1.1.0(7y ago)44.5k[3 issues](https://github.com/alrik11es/object-dot-notation/issues)MITPHP

Since Jun 6Pushed 7y ago2 watchersCompare

[ Source](https://github.com/alrik11es/object-dot-notation)[ Packagist](https://packagist.org/packages/alrik11es/object-dot-notation)[ RSS](/packages/alrik11es-object-dot-notation/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (1)Versions (7)Used By (0)

[![alt tag](https://raw.githubusercontent.com/alrik11es/object-dot-notation/master/dot-library.png)](https://raw.githubusercontent.com/alrik11es/object-dot-notation/master/dot-library.png) [![Build Status](https://camo.githubusercontent.com/d6642fbc3b1cdcf856e452cbf42e52133cbdad1a32d52f4b540bb2f4d1a5c34b/68747470733a2f2f7472617669732d63692e6f72672f616c72696b313165732f6f626a6563742d646f742d6e6f746174696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/alrik11es/object-dot-notation)

```
The idea behind this library is to allow the access through
`config.port` dot notation to object data.

```

### Why?

[](#why)

My main problem was when accessing API data.

```
{
    "hits":{
        "products": [
            {
                "name": "Shoe"
            }
        ]
    }
}
```

Imagine this is the result from an API. Usually to be sure that the data is what I want I'm gonna need to do:

```
