var out = [];
_getProjectsId()
  .then(testprojects => {
    for(testproject in testprojects){
      _getProjectTestCases(testprojects[testproject].id).then(testcases =>{
        for(testcase in testcases){
          _getTestCase(testcases[testcase].id).then(testcase_info => console.log(out.push(testcase_info))).catch((error) => console.log(error));
        }
      }).catch((error) => console.log(error));
    }
  }).catch((error) => console.log(error));
Hi every one, I'm trying to use promises with nested for loop, and at the end, my out array is empty.
via MrQwenty
No comments:
Post a Comment