PHPackages                             lukascivil/treewalker - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. lukascivil/treewalker

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

lukascivil/treewalker
=====================

TreeWalker is a simple and small Library that will help you to work faster with manipulation of structures in PHP

0.41(9y ago)75998.4k—0.5%28[1 PRs](https://github.com/lukascivil/TreeWalker/pulls)7MITPHPCI passing

Since Jul 11Pushed 3mo ago9 watchersCompare

[ Source](https://github.com/lukascivil/TreeWalker)[ Packagist](https://packagist.org/packages/lukascivil/treewalker)[ RSS](/packages/lukascivil-treewalker/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)DependenciesVersions (8)Used By (7)

TreeWalker
==========

[](#treewalker)

TreeWalker is a simple and small Library that will help you to work faster with manipulation of structures in PHP

![Build Status](https://github.com/lukascivil/TreeWalker/workflows/PHP%20Composer/badge.svg)[![Total Downloads](https://camo.githubusercontent.com/99afff3c34f43f14f2daee2ea704e255ba0a196e45fe53a7d9f1372f8e93f089/68747470733a2f2f706f7365722e707567782e6f72672f6c756b6173636976696c2f7472656577616c6b65722f646f776e6c6f616473)](https://packagist.org/packages/lukascivil/treewalker)[![codecov](https://camo.githubusercontent.com/e30ab374b032e20a5c70ab9ff1b736d03de41997f37b10903fb99de089e3d1d8/68747470733a2f2f636f6465636f762e696f2f67682f6c756b6173636976696c2f5472656557616c6b65722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/lukascivil/TreeWalker)[![License](https://camo.githubusercontent.com/74ee8e5c997eb3b2a399375ad75c80a168f708db7b6d55ed0447df7b54fcfeee/68747470733a2f2f706f7365722e707567782e6f72672f6c756b6173636976696c2f7472656577616c6b65722f6c6963656e73652e737667)](https://packagist.org/packages/lukascivil/treewalker)

- getdiff() - Get json difference
- replaceValues() - Edit json value (Recursively)
- walker() - Edit json (Recursively)
- structMerge() - Joins two structures
- createDynamicallyObjects() - Create nested structure by Dynamic keys
- getDynamicallyValue() - Dynamically get a structure property
- setDynamicallyValue() - Dynamically access a structure property to set a value

*structure = \["jsonstring", "object", "array"\]*

### [EXAMPLE - master](http://treewalker.lukascivil.com.br/)

[](#example---master)

### Prerequisites

[](#prerequisites)

- PHP &gt;= 5.5

Installation
------------

[](#installation)

### Using composer

[](#using-composer)

Put the require statement for `TreeWalker` in your `composer.json` and install:

```
{
  "require": {
    "lukascivil/treewalker": "dev-master"
  }
}
```

```
composer require lukascivil/treewalker dev-master

```

### Manually

[](#manually)

include the `TreeWalker.php`

```
