Callback function, but just at the end!

Callback function, but just at the end!

Hi to everybody! It's my first post here!!!
Let's try to explain the problem that i have...
I need, in a script, to call an ajax (.post) function, and while i read the data that this function return, i need to call another .post function with some of the data that i read. so something like it
  1. $.post(
            "ajax/func.php", { ope:"leggiOpereMuseo", idM:idMuseo },
            function(xml){
                $(xml).find('opera').each(function(){
                    var idOpe    = $(this).attr('indice');
                    $.post(
                        "ajax/func.php", {ope:"leggiSchedaOpera", idO:idOpe},
                        function(data){
                             ----- HERE!!!
                        },"json"
                    );
                });
                fineAnalisi();
            },"xml"
        );













can you see HERE!!!? well, here i create a temporany array and add it to a super array that remember all the data i read. Well, i need to call a function that work on this super array at the end of all the xml reading!
so, he have to read, let's say, 10 object in the first post and in the inside post from 10 to 20 element, read it and create an array for each of this!
At the end, I need to call analisiDati() and complete my work.
The problem is that i don't know where i have to call this function!!!

Can somebody explain it to me?
Thanks!!!!