Hot answers tagged

1

You're probably seeing the result you are seeing because you are not anticipating how the async nature of the code execution is actually happening. First of all, you are doing something in your initial line of code that is a bit different from the example in the linked question. You have // you are assigning the return value of ...


1

You can extract the main tasks and subtasks in separate arrays in success function like: var mainTasks = [], subTasks = []; for(var i = 0; i < data.length; i++) { if(data[i].ParentID.Id) { subTasks.push(data[i]); } else { mainTasks.push(data[i]); } } For more information check this: Sharepoint 2013 rest api group subtask with ...


Only top voted, non community-wiki answers of a minimum length are eligible