score:5

Accepted answer
 const payload = fakePayload.map(payload =>{
    if(payload.payloadId === rngPayloadId){
       // you are mapping through ids, so just have to use as value {id}
       return payload.drugsId.map(id => {
           return <div> Drug ID: {id}, lat: {payload.lat}, lon: {payload.lon} </div>
       })
    }
})

Related Query

More Query from same tag