dimanche 1 février 2015

Most efficient way to get all sub sites under a site collection/sub site using JSOM?

For the question lets assume the following site hierarchy



  • Root Site

    • Sub Site 01

      • Sub Site 0101

      • Sub Site 0102

        • Sub Site 010201





    • Sub Site 02

    • Sub Site 03

      • Sub Site 0301






Now if I want to get all these sub site object in an array, what would be the best approach.


PS - rootWeb.get_webs() would return me just the immediate child sub sites. This would require me the make a recursive async call to each child sub site to get further down the hierarchy. I m guessing this will have performance issues and callback challenges.


Aucun commentaire:

Enregistrer un commentaire