How does promise.all pass on both data?

    getLatestJob(context){

         const result1=api.getJobJsonFromShield(context);
         const result2=api.getJobJson(context);
         Promise.all([result1,result2]).then(function(results){

    return {

      "shielddata":results[0], //response
      "nbudata":results[1]
    }
}).then(function(responses){return responses["shielddata"].json()



}).then(function(json){
  console.log(json)
}

I want to get both data and execute the corresponding mutation respectively. The first return can get two response objects, and then how to get the json-sharp-sharp-sharp problem description


can you do a good job in typesetting first?

guess:

getLatestJob(context){
  const result1=api.getJobJsonFromShield(context)
    .then(response => {
      return response.json();
    });
  const result2=api.getJobJson(context)
    .then(response => {
      return response.json();
    });
  Promise.all([result1, result2])
    .then(([shieldData, nbuData]) {
      
    });
}    
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bfdb9b-323b7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bfdb9b-323b7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?