$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://livehealth.solutions/getAllTestsAndProfiles/?token=3f115cd0-c79b-11eb-b07b-0aa43715764a',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$response = curl_exec($curl);
curl_close($curl);
$resArr = json_decode($response);
echo "<pre>"; print_r($resArr); echo "</pre>";
displays the list of array values... as shown below...
but i need to get specific object like test code /test id /test Name
Please help me out...
stdClass Object
(
[profileTestList] => Array
(
[0] => stdClass Object
(
[testAmount] => 2200.0
[testCode] => SPUTUM CBNAAT
[testCategory] => -
[testList] => Array
(
[0] => stdClass Object
[1] => stdClass Object
(
[testAmount] => 0.0
[testCode] => @$*
[testCategory] => -
[departmentName] => Pathology
[testName] => 2nd Day
[testID] => 4565681
[integrationCode] =>
)
[2] => stdClass Object
(
[testAmount] => 0.0
[testCode] => @$*
[testCategory] => -
[departmentName] => Pathology
[testName] => 3rd Day
[testID] => 4565682
[integrationCode] =>
)
)
[testName] => SPUTUM CBNAAT
[testID] => 4566044
[integrationCode] =>
)
[1] => stdClass Object
(
[testAmount] => 1499.0
[testCode] => Covid Master Health
[testCategory] => -
[testList] => Array
(
[0] => stdClass Object
(
[testAmount] => 300
[testCode] => CBP
[testCategory] => Haematology
[departmentName] => Lab
[testName] => CBP( complete blood picture)
[testID] => 4565933
[integrationCode] =>
)
[1] => stdClass Object
(
[testAmount] => 400.0
[testCode] => LIPID PROFILE
[testCategory] => Biochemistry
[departmentName] => Lab
[testName] => LIPID PROFILE
[testID] => 4565688
[integrationCode] => BH107G
)
[2] => stdClass Object
(
[testAmount] => 500.0
[testCode] => LIVER FUNCTION TEST
[testCategory] => Immunology
[departmentName] => Lab
[testName] => LIVER FUNCTION TEST
[testID] => 4565742
[integrationCode] => BHL028
)
[3] => stdClass Object
(
[testAmount] => 500
[testCode] => RFT
[testCategory] => Biochemistry
[departmentName] => Lab
[testName] => RFT
[testID] => 4565734
[integrationCode] =>
)
[4] => stdClass Object
(
[testAmount] => 550.0
[testCode] => HBA1C
[testCategory] => Biochemistry
[departmentName] => Lab
[testName] => HBA1C
[testID] => 4565733
[integrationCode] =>
)
[5] => stdClass Object
(
[testAmount] => 1300.0
[testCode] => D-DIMER
[testCategory] => Biochemistry
[departmentName] => Lab
[testName] => D-DIMER
[testID] => 4565719
[integrationCode] => BHD001
)
[6] => stdClass Object
(
[testAmount] => 250.0
[testCode] => PT & INR
[testCategory] => Biochemistry
[departmentName] => Lab
[testName] => PT & INR
[testID] => 4565696
[integrationCode] => BHP063
)
[7] => stdClass Object.....