Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

196
Vistas
i would like to loop through this and get each "transactionReference"
"responseBody": {
        "content": [{
                "paymentMethod": "ACCOUNT_TRANSFER",
                "createdOn": "2019-10-29T11:02:00.000+0000",
                "amount": 22.00,
                "flagged": false,
                "currencyCode": "NGN",
                "completedOn": "2019-10-29T11:08:11.000+0000",
                "paymentDescription": "Isoken 001",
                "paymentStatus": "EXPIRED",
                "transactionReference": "MNFY|20191029110159|005805",
                "paymentReference": "MNFY|20191029110159|005805",
                "merchantCode": "ZETBBQ5Q7VLB",
                "merchantName": "Lahray LTD "
            },
            {
                "paymentMethod": "ACCOUNT_TRANSFER",
                "createdOn": "2019-10-29T10:45:12.000+0000",
                "amount": 22.00,
                "flagged": false,
                "fee": 0.18,
                "currencyCode": "NGN",
                "completedOn": "2019-10-29T10:49:49.000+0000",
                "paymentDescription": "Isoken 001",
                "paymentStatus": "PAID",
                "transactionReference": "MNFY|20191029104511|005830",
                "paymentReference": "MNFY|20191029104511|005830",
                "merchantCode": "ZETBBQ5Q7VLB",
                "merchantName": "Lahray LTD ",
                "payableAmount": 22.00
            }
        ],
        "last": false,
        "totalElements": 258,
        "totalPages": 129,
        "first": true,
        "numberOfElements": 2,
        "size": 2,
        "number": 0,
        "empty": false
    }
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Hello you try to do Object Iteration, check the official documentation's link in PHP for more.

Clear Point: let me explain it simply as who I'm see the thing, your output is an object output.. let suppose that object is named "transactionReferences"

You can looping thought this object. Foreach loop would work fine with you in this case.

How it works:

foreach ($transactionReferences as $value) {
   echo $obj->property;
}

More approach using to access your object properties

foreach ($transactionReferences as $value){
      echo $value->content;
}

Hope this explanation helps

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda