Let´s see some code to explain better: I made a request to a WS as showing bellow:
$idERP = 1;
$grupoEcota = new \SoapClient($url);
$paramExtrato = array(
'sGrupo' => $request->sGrupo,
'iCota' => $request->iCota,
'iIdERP' => $idERP,
);
$responseExtrato = $grupoEcota->ROS_ExtratoContaCorrente($paramExtrato);
$grupoEcota = $responseExtrato->ExtratoContaCorrente;
I get a response from a WS witch looks like this from dd(die and dump):
$dados[] = $grupoEcota->{'PARCELAS-PAGAS'};
dd($dados);
array:1 [▼
0 => {#784 ▼
+"PARCELA-PAGA": array:21 [▼
0 => {#783 ▼
+"NUMERO-PARCELA": 48
+"DATA-VENCIMENTO": "20170818"
+"DATA-PAGAMENTO": "20170919"
+"VALOR-PARCELA": 580.28
+"HITORICO-PARCELA": ""
+"PERC-PAGO": 3.491
}
1 => {#771 ▶}
2 => {#781 ▶}
3 => {#780 ▶}
4 => {#779 ▶}
5 => {#778 ▶}
6 => {#777 ▶}
7 => {#776 ▶}
8 => {#775 ▶}
9 => {#774 ▶}
10 => {#773 ▶}
11 => {#772 ▶}
12 => {#757 ▶}
13 => {#770 ▶}
14 => {#769 ▶}
15 => {#768 ▶}
16 => {#767 ▶}
17 => {#766 ▶}
18 => {#765 ▶}
19 => {#764 ▶}
20 => {#763 ▶}
]
}
]
I need to get only the first "DATA-VENCIMENTO": "20170818" item. How do I do it, please?