Skip to content

Commit 7d81ef5

Browse files
authored
Merge pull request #14 from GitHubHubus/patch-1
Fixed some typos in documentation
2 parents 8a4e077 + 430b4fd commit 7d81ef5

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,14 @@ You don't need to call `fetch()` method after this. Because this method will fet
193193
Let's say you want to get the value of _'cities'_ property of your Json Data. You can do it like this:
194194

195195
```php
196-
$q = new jsonq('data.json');
196+
$q = new Jsonq('data.json');
197197
echo $q->find('vendor.name');
198198
```
199199

200200
If you want to traverse to more deep in hierarchy, you can do it like:
201201

202202
```php
203-
$q = new jsonq('data.json');
203+
$q = new Jsonq('data.json');
204204
echo $q->find('vendor.name');
205205
```
206206

@@ -219,14 +219,14 @@ Difference between this method and `find()` is that, `find()` method will return
219219
Let's say you want to start query over the values of _'vendor.name'_ property of your JSON Data. You can do it like this:
220220

221221
```php
222-
$q = new jsonq('data.json');
222+
$q = new Jsonq('data.json');
223223
echo $q->from('vendor.name')->get();
224224
```
225225

226226
If you want to traverse to more deep in hierarchy, you can do it like:
227227

228228
```php
229-
$q = new jsonq('data.json');
229+
$q = new Jsonq('data.json');
230230
echo $q->from('users.5.visits')->get();
231231
```
232232

@@ -273,14 +273,14 @@ This is an alias method of `from()` and will behave exactly like that. See examp
273273
Let's say you want to find the _'users'_ who has _`id`_ of `1`. You can do it like this:
274274

275275
```php
276-
$q = new jsonq('data.json');
276+
$q = new Jsonq('data.json');
277277
$res = $q->from('users')->where('id', '=', 1)->get();
278278
```
279279

280280
You can add multiple _where_ conditions. It'll give the result by AND-ing between these multiple where conditions.
281281

282282
```php
283-
$q = new jsonq('data.json');
283+
$q = new Jsonq('data.json');
284284
$res = $q->from('users')
285285
->where('id', '=', 1)
286286
->where('location', '=', 'barisal')
@@ -296,7 +296,7 @@ Parameters of `orWhere()` are the same as `where()`. The only difference between
296296
For example, if you want to find the users with _id_ of `1` or `2`, you can do it like this:
297297

298298
```php
299-
$q = new jsonq('data.json');
299+
$q = new Jsonq('data.json');
300300
$res = $q->from('users')
301301
->where('id', '=', 1)
302302
->orWhere('id', '=', 2)
@@ -361,7 +361,7 @@ This method will behave like `where(key, 'contains', val)` method call.
361361
Let's say you want to find the sum of the _'price'_ of the _'products'_. You can do it like this:
362362

363363
```php
364-
$q = new jsonq('data.json');
364+
$q = new Jsonq('data.json');
365365
$res = $q->from('products')
366366
->where('cat', '=', 1)
367367
->sum('price');
@@ -379,7 +379,7 @@ It will return the number of elements in the collection.
379379
Let's say you want to find how many elements are in the _'products'_ property. You can do it like:
380380

381381
```php
382-
$q = new jsonq('data.json');
382+
$q = new Jsonq('data.json');
383383
$res = $q->from('products')
384384
->where('cat', '=', 1)
385385
->count();
@@ -400,7 +400,7 @@ This is an alias method of `count()`.
400400
Let's say you want to find the maximum of the _'price'_ of the _'products'_. You can do it like this:
401401

402402
```php
403-
$q = new jsonq('data.json');
403+
$q = new Jsonq('data.json');
404404
$res = $q->from('products')
405405
->where('cat', '=', 1)
406406
->max('price);
@@ -418,7 +418,7 @@ See detail example [here](examples/max.php)
418418
Let's say you want to find the minimum of the _'price'_ of the _'products'_. You can do it like this:
419419

420420
```php
421-
$q = new jsonq('data.json');
421+
$q = new Jsonq('data.json');
422422
$res = $q->from('products')
423423
->where('cat', '=', 1)
424424
->min('price');
@@ -436,7 +436,7 @@ See detail example [here](examples/min.php)
436436
Let's say you want to find the average of the _'price'_ of the _'products'_. You can do it like this:
437437

438438
```php
439-
$q = new jsonq('data.json');
439+
$q = new Jsonq('data.json');
440440
$res = $q->from('products')
441441
->where('cat', '=', 1)
442442
->avg('price');
@@ -467,7 +467,7 @@ It will return the last element of the collection.
467467
**example:**
468468

469469
```php
470-
$q = new jsonq('data.json');
470+
$q = new Jsonq('data.json');
471471
$res = $q->from('products')
472472
->where('cat', '=', 1)
473473
->last();
@@ -484,7 +484,7 @@ It will return the nth element of the collection. If the given index is a **posi
484484
**example:**
485485

486486
```php
487-
$q = new jsonq('data.json');
487+
$q = new Jsonq('data.json');
488488
$res = $q->from('products')
489489
->where('cat', '=', 1)
490490
->nth(2);
@@ -501,7 +501,7 @@ It will return **true** if the element is not **empty** or not **null** or not a
501501
Let's say you want to find how many elements are in the _'products'_ property. You can do it like:
502502

503503
```php
504-
$q = new jsonq('data.json');
504+
$q = new Jsonq('data.json');
505505
$res = $q->from('products')
506506
->where('cat', '=', 1)
507507
->exists();
@@ -518,7 +518,7 @@ See detail example [here](examples/exists.php).
518518
Let's say you want to group the _'users'_ data based on the _'location'_ property. You can do it like:
519519

520520
```php
521-
$q = new jsonq('data.json');
521+
$q = new Jsonq('data.json');
522522
$res = $q->from('users')
523523
->groupBy('location')
524524
->get();
@@ -537,8 +537,8 @@ See detail example [here](examples/group-by.php).
537537
Let's say you want to sort the _'arr'_ data. You can do it like:
538538

539539
```php
540-
$q = new jsonq();
541-
$res = $q->collect([7, 5, 9, 1, 3)
540+
$q = new Jsonq();
541+
$res = $q->collect([7, 5, 9, 1, 3])
542542
->sort();
543543
```
544544

@@ -556,7 +556,7 @@ See detail example [here](examples/sort.php).
556556
Let's say you want to sort the _'price'_ data of _'products'_. You can do it like:
557557

558558
```php
559-
$q = new jsonq('data.json');
559+
$q = new Jsonq('data.json');
560560
$res = $q->from('products')
561561
->where('cat', '=', 1)
562562
->sortBy('price', 'desc');

0 commit comments

Comments
 (0)