Skip to content

Commit 37b5d39

Browse files
committed
Readme structure
1 parent 65288eb commit 37b5d39

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,23 @@ This implementation passes all compliance tests of [JSONPath Compliance Test Sui
1313

1414
## Table of contents
1515
* [Installation](#installation)
16-
* [Get values](#get-values)
17-
* [Get paths](#get-paths)
18-
* [Set values](#set-values)
19-
* [Set values and create non-existent paths](#set-values-and-create-non-existent-paths)
20-
* [Delete paths](#delete-paths)
21-
* [Custom function extensions](#custom-function-extensions)
16+
* [Examples](#examples)
17+
* [Get values](#get-values)
18+
* [Get paths](#get-paths)
19+
* [Set values](#set-values)
20+
* [Set values and create non-existent paths](#set-values-and-create-non-existent-paths)
21+
* [Delete paths](#delete-paths)
22+
* [Custom function extensions](#custom-function-extensions)
2223

2324
## Installation
2425
The library can be installed from a command line interface by using [composer](https://getcomposer.org/).
2526

2627
```
2728
composer require ropi/json-path-evaluator
2829
```
30+
## Examples
2931

30-
## Get values
32+
### Get values
3133
The following example shows how to get values that match a JSONPath.\
3234
The result is always an array of values that match the JSONPath. If there are no matches, an empty array is returned.
3335
```php
@@ -234,7 +236,7 @@ Get all books where ISBN ends with 1, 2 or 3 (Regular Expression):
234236
235237
```
236238
237-
## Get paths
239+
### Get paths
238240
The following example shows how to get value paths that match a JSONPath, where each value path is represented as normalized JSONPath according to section 2.7 of [JSONPath internet draft](https://datatracker.ietf.org/doc/draft-ietf-jsonpath-base/21/).\
239241
The result is always an array of matched paths. If there are no matches, an empty array is returned.
240242
```php
@@ -321,7 +323,7 @@ Get all books cheaper than 10:
321323
]
322324
323325
```
324-
## Set values
326+
### Set values
325327
The following example shows how to set/replace values.
326328
```php
327329
<?php
@@ -453,7 +455,7 @@ Set prices alternately to 1, 2 and 3:
453455
}
454456
455457
```
456-
## Set values and create non-existent paths
458+
### Set values and create non-existent paths
457459
The following example shows how to set values on non-existent paths.
458460
```php
459461
<?php
@@ -502,7 +504,7 @@ array(1) {
502504
}
503505
504506
```
505-
## Delete paths
507+
### Delete paths
506508
The following example shows how to delete/remove/unset paths that match a JSONPath.
507509
508510
```php
@@ -577,7 +579,7 @@ Delete all books that are more expensive than 9 euros:
577579
}
578580
579581
```
580-
## Custom function extensions
582+
### Custom function extensions
581583
The following example shows how to register custom function extensions according to section 2.4 of [JSONPath internet draft](https://datatracker.ietf.org/doc/draft-ietf-jsonpath-base/21/).
582584
```php
583585
<?php

0 commit comments

Comments
 (0)