Skip to content

Commit dd222ac

Browse files
committed
added param $object to Jsonq::find method (allow getting result as arrays instead of stdClass)
1 parent 5780e0d commit dd222ac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Jsonq.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,13 +405,14 @@ public function sort($order = 'asc')
405405
* getting data from desire path
406406
*
407407
* @param string $path
408+
* @param bool $object
408409
* @return mixed
409410
* @throws NullValueException
410411
* @throws ConditionNotAllowedException
411412
*/
412-
public function find($path)
413+
public function find($path, $object = true)
413414
{
414-
return $this->from($path)->prepare()->get();
415+
return $this->from($path)->prepare()->get($object);
415416
}
416417

417418
/**

0 commit comments

Comments
 (0)