private function parseData($obj)
    {
        $data = [
            'temperature' => [
                'now' => [
                    'value' => $obj->temperature->now->getValue(),
                    'unit' => $obj->temperature->now->getUnit()
                ],
                'min' => [
                    'value' => $obj->temperature->min->getValue(),
                    'unit' => $obj->temperature->min->getUnit()
                ],
                'max' => [
                    'value' => $obj->temperature->max->getValue(),
                    'unit' => $obj->temperature->max->getUnit()
                ]
            ],
            'humidity' => [
                'value' => $obj->humidity->getValue(),
                'unit' => $obj->humidity->getUnit()
            ],
            'pressure' => [
                'value' => $obj->pressure->getValue(),
                'unit' => $obj->pressure->getUnit()
            ],
            'wind' => [
                'speed' => [
                    'value' => $obj->wind->speed->getValue(),
                    'unit' => $obj->wind->speed->getUnit(),
                    'description' => $obj->wind->speed->getDescription(),
                    'description_slug' => str_slug($obj->wind->speed->getDescription())
                ],
                'direction' => [
                    'value' => $obj->wind->direction->getValue(),
                    'unit' => $obj->wind->direction->getUnit(),
                    'description' => $obj->wind->direction->getDescription(),
                    'description_slug' => str_slug($obj->wind->direction->getDescription())
                ]
            ],
            'clouds' => [
                'value' => $obj->clouds->getValue(),
                'unit' => $obj->clouds->getUnit(),
                'description' => $obj->clouds->getDescription(),
                'description_slug' => str_slug($obj->clouds->getDescription())
            ],
            'precipitation' => [
                'value' => $obj->precipitation->getValue(),
                'unit' => $obj->precipitation->getUnit(),
                'description' => $obj->precipitation->getDescription(),
                'description_slug' => str_slug($obj->precipitation->getDescription())
            ],
            'weather' => [
                'id' => $obj->weather->id,
                'description' => $obj->weather->description,
                'description_slug' => str_slug($obj->weather->description),
                'icon' => $obj->weather->icon
            ],
        ];

        return $data;
    }
private function parseData($obj)
    {
        $data = [
            'temperature' => [
                'now' => [
                    'value' => $obj->temperature->now->getValue(),
                    'unit' => $obj->temperature->now->getUnit()
                ],
                'min' => [
                    'value' => $obj->temperature->min->getValue(),
                    'unit' => $obj->temperature->min->getUnit()
                ],
                'max' => [
                    'value' => $obj->temperature->max->getValue(),
                    'unit' => $obj->temperature->max->getUnit()
                ]
            ],
            'humidity' => [
                'value' => $obj->humidity->getValue(),
                'unit' => $obj->humidity->getUnit()
            ],
            'pressure' => [
                'value' => $obj->pressure->getValue(),
                'unit' => $obj->pressure->getUnit()
            ],
            'wind' => [
                'speed' => [
                    'value' => $obj->wind->speed->getValue(),
                    'unit' => $obj->wind->speed->getUnit(),
                    'description' => $obj->wind->speed->getDescription(),
                    'description_slug' => str_slug($obj->wind->speed->getDescription())
                ],
                'direction' => [
                    'value' => $obj->wind->direction->getValue(),
                    'unit' => $obj->wind->direction->getUnit(),
                    'description' => $obj->wind->direction->getDescription(),
                    'description_slug' => str_slug($obj->wind->direction->getDescription())
                ]
            ],
            'clouds' => [
                'value' => $obj->clouds->getValue(),
                'unit' => $obj->clouds->getUnit(),
                'description' => $obj->clouds->getDescription(),
                'description_slug' => str_slug($obj->clouds->getDescription())
            ],
            'precipitation' => [
                'value' => $obj->precipitation->getValue(),
                'unit' => $obj->precipitation->getUnit(),
                'description' => $obj->precipitation->getDescription(),
                'description_slug' => str_slug($obj->precipitation->getDescription())
            ],
            'weather' => [
                'id' => $obj->weather->id,
                'description' => $obj->weather->description,
                'description_slug' => str_slug($obj->weather->description),
                'icon' => $obj->weather->icon
            ],
        ];

        return $data;
    }
private function parseData ( $ obj ) { $ data = [ 'temperature' => [ 'now' => [ 'value' => $ obj -> temperature -> now -> getValue ( ) , 'unit' => $ obj -> temperature -> now -> getUnit ( ) ] , 'min' => [ 'value' => $ obj -> temperature -> min -> getValue ( ) , 'unit' => $ obj -> temperature -> min -> getUnit ( ) ] , 'max' => [ 'value' => $ obj -> temperature -> max -> getValue ( ) , 'unit' => $ obj -> temperature -> max -> getUnit ( ) ] ] , 'humidity' => [ 'value' => $ obj -> humidity -> getValue ( ) , 'unit' => $ obj -> humidity -> getUnit ( ) ] , 'pressure' => [ 'value' => $ obj -> pressure -> getValue ( ) , 'unit' => $ obj -> pressure -> getUnit ( ) ] , 'wind' => [ 'speed' => [ 'value' => $ obj -> wind -> speed -> getValue ( ) , 'unit' => $ obj -> wind -> speed -> getUnit ( ) , 'description' => $ obj -> wind -> speed -> getDescription ( ) , 'description_slug' => str_slug ( $ obj -> wind -> speed -> getDescription ( ) ) ] , 'direction' => [ 'value' => $ obj -> wind -> direction -> getValue ( ) , 'unit' => $ obj -> wind -> direction -> getUnit ( ) , 'description' => $ obj -> wind -> direction -> getDescription ( ) , 'description_slug' => str_slug ( $ obj -> wind -> direction -> getDescription ( ) ) ] ] , 'clouds' => [ 'value' => $ obj -> clouds -> getValue ( ) , 'unit' => $ obj -> clouds -> getUnit ( ) , 'description' => $ obj -> clouds -> getDescription ( ) , 'description_slug' => str_slug ( $ obj -> clouds -> getDescription ( ) ) ] , 'precipitation' => [ 'value' => $ obj -> precipitation -> getValue ( ) , 'unit' => $ obj -> precipitation -> getUnit ( ) , 'description' => $ obj -> precipitation -> getDescription ( ) , 'description_slug' => str_slug ( $ obj -> precipitation -> getDescription ( ) ) ] , 'weather' => [ 'id' => $ obj -> weather -> id , 'description' => $ obj -> weather -> description , 'description_slug' => str_slug ( $ obj -> weather -> description ) , 'icon' => $ obj -> weather -> icon ] , ] ; return $ data ; }
Helper function to parse data.

@param $obj
@return array
Helper function to parse data .