Double $.each break label ( please teach me )

Joined
Jul 9, 2023
Messages
25
Reaction score
0
hello.

I want to escape 2-Loop.
How do you do label break?
How do you declare outloop , innerloop?

Code:
var outloop; //<=====Is it correct to declare like this?
var innerloop; //<=====Is it correct to declare like this?

$.(#combobox).each( function() //<===== 1-Loop
{
     var stage = $.(this).val();
     outloop : $.each( ArrayList, function( idx, item ) //<===== 2-Loop
     {
        innerloop : $.each( item, function( idx2, item2 ) //<===== 3-Loop
         {
            if ( stage == item2.toString() )
            {
                 var argData =
                 {
                     …..
                 };
                 $.ajax({ method: “POST”,
                           url : ……/api/abc.xml,
                         })
                         .done( function( data )
                         {
                             var value = JSON.parse(data);
                         });                      
                  break outloop;
            }
         });
     });
});
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,060
Latest member
BuyKetozenseACV

Latest Threads

Top