Group API Output via JSON

Asked

Viewed 8 times

0

Is there any way to Group the returns of an API, accessed via Json

cpReferencia = 1
cpDataMoldagem = 26/10/2020 | cpStatus = APROVADO
cpDataMoldagem = 20/11/2020 | cpStatus = NEGADO
---------------------------------------------------
cpReferencia = 2
cpDataMoldagem = 01/10/2020 | cpStatus = APROVADO

I receive this data via JSON

   $json = json_decode(file_get_contents($URL_BASE_API.":8085/api/dados?usuario=".$usuario));
    //var_dump($json);
    for($i = 0; $i < count($json); $i++) {
         $json[$i]->{'cpReferencia'};
         $json[$i]->{'cpDataMoldagem '};
         $json[$i]->{'cpStatus '};    
    }
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.