Peekmo\JsonPath\JsonStore::toArray PHP Method

toArray() public method

Returns the given json string to array
public toArray ( ) : array
return array
    public function toArray()
    {
        return $this->data;
    }

Usage Example

Example #1
0
 public function testSetData()
 {
     $this->assertEquals($this->jsonStore->toArray(), json_decode($this->json, true));
     $new = ['a' => 'b'];
     $this->jsonStore->setData($new);
     $this->assertEquals($this->jsonStore->toArray(), $new);
     $this->assertNotEquals($this->jsonStore->toArray(), json_decode($this->json, true));
 }