Skip to content

ajthinking/data-query

Repository files navigation

Query spaghetti data structures 🍝

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

composer require ajthinking/data-query

Usage

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 for more information.

About

Access properties and methods in uncertain PHP data structures

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages