Accepted answer

Use index to pick the data you want

In this case you will need to find the last index. this is data.length - 1

Then you can get the very last data by simply going data[data.length - 1]

let datas = ( && &&[ - 1];

return datas ? (    
<div className="box">  
   < Col sm="12" key={}>
    <div key="a"> 
      <CardText className="textForAdminPageButHereIsForRandomId">{datas.randomID}      
</div>) : null;

Related Query

More Query from same tag