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

339
Views
How to map json payload, l want to get "items" from json payload in React

I have implemented this async for api service to get payload.

 export function loadAsync() {
            return async dispatch => {
                try {
                    dispatch({ type: 'LOADING_START' }) 
                    const item = await asyncService.query()
                    const mapItems = item['payload']['items'];  // l need help here please
        
                    dispatch({ type: 'SET_GRADE', mapItems})
                    console.log('Actions: err in load',mapItems) 
        
                } catch (err) {
                    console.log('Actions: err in load', err)
                } finally {
                    dispatch({ type: 'LOADING_DONE' })
                }
            }
        }

Expected payload { "code": 200, "payload": { "items": [ { "name": "test test test test test ", "grades": [ { "name": "C" }, { "name": "A" } ] } ] } }

about 4 years ago · Juan Pablo Isaza
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!