Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

208
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!