Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ajthinking/data-query

Access properties and methods in uncertain PHP data structures
https://github.com/ajthinking/data-query

laravel php

Last synced: 3 days ago
JSON representation

Access properties and methods in uncertain PHP data structures

Awesome Lists containing this project

README

        

# Query spaghetti data structures :spaghetti:
Access properties and methods in uncertain PHP data structures. Supports object and array access and can forward method calls. It automatically interprets the underlying data structure (JSON, array or object) and simply gives you the (nested) result.

## Installation
```bash
composer require ajthinking/data-query
```
## Usage

```php
use Ajthinking\DataQuery\DataQuery;

DataQuery::in($spaghetti)
->prop
->method('some arg')
->nestedProp
['deep nested prop with spaces']
->get(); // result or null
```

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

[](https://supportukrainenow.org)