How can I break an outer loop with PHP?PHP: Breaking the nested loopPHP break from 2 loopsPHP Break in Switch Not Working As ExpectedIn Php 'foreach' skip the current iteration block and also rest of the loopHow can I find the array key from second array where the inner keys and values match first array?Break loop from inside loop phpHow can I prevent SQL injection in PHP?Deleting an element from an array in PHPHow do I get PHP errors to display?Loop through an array in JavaScriptHow do you parse and process HTML/XML in PHP?Reference — What does this symbol mean in PHP?“Notice: Undefined variable”, “Notice: Undefined index”, and “Notice: Undefined offset” using PHPHow do I check if a string contains a specific word?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

Why did modems have speakers?

Has Peter Parker ever eaten bugs?

What kind of curve (or model) should I fit to my percentage data?

How does mathematics work?

Book in which the "mountain" in the distance was a hole in the flat world

Why are Oscar, India, and X-Ray (O, I, and X) not used as taxiway identifiers?

Would using carbon dioxide as fuel work to reduce the greenhouse effect?

What gave NASA the confidence for a translunar injection in Apollo 8?

What is "It is x o'clock" in Japanese with subject

What is the best word describing the nature of expiring in a short amount of time, connoting "losing public attention"?

How can Kazakhstan perform MITM attacks on all HTTPS traffic?

Is it ethical to tell my teaching assistant that I like him?

Where is this photo of a group of hikers taken? Is it really in the Ural?

Was US film used in Luna 3?

How can I indicate that what I'm saying is not sarcastic online?

Why is DC so, so, so Democratic?

How did pilots avoid thunderstorms and related weather before “reliable” airborne weather radar was introduced on airliners?

Impact of throwing away fruit waste on a peak > 3200 m above a glacier

Do I care if the housing market has gone up or down, if I'm moving from one house to another?

Extrapolation v. Interpolation

Chemistry Riddle

Short story where a flexible reality hardens to an unchanging one

How am I supposed to put out fires?

Why did NASA use Imperial units?



How can I break an outer loop with PHP?


PHP: Breaking the nested loopPHP break from 2 loopsPHP Break in Switch Not Working As ExpectedIn Php 'foreach' skip the current iteration block and also rest of the loopHow can I find the array key from second array where the inner keys and values match first array?Break loop from inside loop phpHow can I prevent SQL injection in PHP?Deleting an element from an array in PHPHow do I get PHP errors to display?Loop through an array in JavaScriptHow do you parse and process HTML/XML in PHP?Reference — What does this symbol mean in PHP?“Notice: Undefined variable”, “Notice: Undefined index”, and “Notice: Undefined offset” using PHPHow do I check if a string contains a specific word?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








116















I am looking to break an outer for/foreach loop in PHP.



This can be done in ActionScript like so:



top : for each(var i:MovieClip in movieClipArray)

for each(var j:String in nameArray)

if(i.name == j) break top;




What's the PHP equivalent?










share|improve this question



















  • 6





    Always have a look at the documentation first: php.net/manual/en/control-structures.break.php

    – Felix Kling
    May 4 '11 at 8:14











  • I've posted 2 solutions, one with labels, as in action script and other that just uses break

    – Edgar Villegas Alvarado
    May 4 '11 at 8:22

















116















I am looking to break an outer for/foreach loop in PHP.



This can be done in ActionScript like so:



top : for each(var i:MovieClip in movieClipArray)

for each(var j:String in nameArray)

if(i.name == j) break top;




What's the PHP equivalent?










share|improve this question



















  • 6





    Always have a look at the documentation first: php.net/manual/en/control-structures.break.php

    – Felix Kling
    May 4 '11 at 8:14











  • I've posted 2 solutions, one with labels, as in action script and other that just uses break

    – Edgar Villegas Alvarado
    May 4 '11 at 8:22













116












116








116


7






I am looking to break an outer for/foreach loop in PHP.



This can be done in ActionScript like so:



top : for each(var i:MovieClip in movieClipArray)

for each(var j:String in nameArray)

if(i.name == j) break top;




What's the PHP equivalent?










share|improve this question
















I am looking to break an outer for/foreach loop in PHP.



This can be done in ActionScript like so:



top : for each(var i:MovieClip in movieClipArray)

for each(var j:String in nameArray)

if(i.name == j) break top;




What's the PHP equivalent?







php for-loop break






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 27 '12 at 23:53







Marty

















asked May 4 '11 at 8:11









MartyMarty

31.6k18 gold badges77 silver badges148 bronze badges




31.6k18 gold badges77 silver badges148 bronze badges







  • 6





    Always have a look at the documentation first: php.net/manual/en/control-structures.break.php

    – Felix Kling
    May 4 '11 at 8:14











  • I've posted 2 solutions, one with labels, as in action script and other that just uses break

    – Edgar Villegas Alvarado
    May 4 '11 at 8:22












  • 6





    Always have a look at the documentation first: php.net/manual/en/control-structures.break.php

    – Felix Kling
    May 4 '11 at 8:14











  • I've posted 2 solutions, one with labels, as in action script and other that just uses break

    – Edgar Villegas Alvarado
    May 4 '11 at 8:22







6




6





Always have a look at the documentation first: php.net/manual/en/control-structures.break.php

– Felix Kling
May 4 '11 at 8:14





Always have a look at the documentation first: php.net/manual/en/control-structures.break.php

– Felix Kling
May 4 '11 at 8:14













I've posted 2 solutions, one with labels, as in action script and other that just uses break

– Edgar Villegas Alvarado
May 4 '11 at 8:22





I've posted 2 solutions, one with labels, as in action script and other that just uses break

– Edgar Villegas Alvarado
May 4 '11 at 8:22












6 Answers
6






active

oldest

votes


















255














In the case of 2 nested loops:



break 2;


http://php.net/manual/en/control-structures.break.php






share|improve this answer


















  • 15





    that goes for continue 2,just for more info =)

    – Arash Moosapour
    Jun 27 '17 at 14:00


















32














PHP Manual says




break accepts an optional numeric
argument which tells it how many
nested enclosing structures are to be
broken out of.




break 2;





share|improve this answer






























    15














    You can using just a break-n statement:



    foreach(...)

    foreach(...)

    if(i.name == j) break 2; //Breaks 2 levels, so breaks outermost foreach




    If you're in php >= 5.3, you can use labels and gotos, similar as in action script:



     foreach(...)

    foreach(...)

    if(i.name == j) goto top;


    top :


    But goto must be used carefully. Goto is evil (considered bad practice)






    share|improve this answer




















    • 1





      There are quite valid uses for goto. Even eval() is not evil (and it is). It has even less uses than goto.

      – lucian303
      May 31 '13 at 19:14






    • 1





      Yes. That's why I said "goto must be used carefully"

      – Edgar Villegas Alvarado
      Aug 29 '13 at 8:05











    • In that note I believe this page is relevant: php.net/manual/en/control-structures.goto.php

      – Ruggi
      May 19 '16 at 14:14



















    12














    You can use break 2; to break out of two loops at the same time. It's not quite the same as your example with the "named" loops, but it will do the trick.






    share|improve this answer






























      6














       $i = new MovieClip();
      foreach($movieClipArray as $i)

      $nameArray = array();
      foreach($nameArray as $n) if($i->name==$n) break 2;






      share|improve this answer























      • Nice try at converting the entire supplied code to PHP, though the break statement doesn't do what I need it to do (it only ends the inner loop).

        – Marty
        May 4 '11 at 8:18












      • refresh you page :) I replaced with break 2 ... which according to PHP Manual: "break accepts an optional numeric argument which tells it how many nested enclosing structures are to be broken out of. "

        – Jordan Arseno
        May 4 '11 at 8:22


















      4














      Use goto?



      for($i=0,$j=50; $i<100; $i++) 

      while($j--)

      if($j==17)
      goto end;


      echo "i = $i";
      end:
      echo 'j hit 17';





      share|improve this answer

























        Your Answer






        StackExchange.ifUsing("editor", function ()
        StackExchange.using("externalEditor", function ()
        StackExchange.using("snippets", function ()
        StackExchange.snippets.init();
        );
        );
        , "code-snippets");

        StackExchange.ready(function()
        var channelOptions =
        tags: "".split(" "),
        id: "1"
        ;
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function()
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled)
        StackExchange.using("snippets", function()
        createEditor();
        );

        else
        createEditor();

        );

        function createEditor()
        StackExchange.prepareEditor(
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader:
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        ,
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        );



        );













        draft saved

        draft discarded


















        StackExchange.ready(
        function ()
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f5880442%2fhow-can-i-break-an-outer-loop-with-php%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        6 Answers
        6






        active

        oldest

        votes








        6 Answers
        6






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        255














        In the case of 2 nested loops:



        break 2;


        http://php.net/manual/en/control-structures.break.php






        share|improve this answer


















        • 15





          that goes for continue 2,just for more info =)

          – Arash Moosapour
          Jun 27 '17 at 14:00















        255














        In the case of 2 nested loops:



        break 2;


        http://php.net/manual/en/control-structures.break.php






        share|improve this answer


















        • 15





          that goes for continue 2,just for more info =)

          – Arash Moosapour
          Jun 27 '17 at 14:00













        255












        255








        255







        In the case of 2 nested loops:



        break 2;


        http://php.net/manual/en/control-structures.break.php






        share|improve this answer













        In the case of 2 nested loops:



        break 2;


        http://php.net/manual/en/control-structures.break.php







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered May 4 '11 at 8:14









        lucian303lucian303

        2,8221 gold badge13 silver badges10 bronze badges




        2,8221 gold badge13 silver badges10 bronze badges







        • 15





          that goes for continue 2,just for more info =)

          – Arash Moosapour
          Jun 27 '17 at 14:00












        • 15





          that goes for continue 2,just for more info =)

          – Arash Moosapour
          Jun 27 '17 at 14:00







        15




        15





        that goes for continue 2,just for more info =)

        – Arash Moosapour
        Jun 27 '17 at 14:00





        that goes for continue 2,just for more info =)

        – Arash Moosapour
        Jun 27 '17 at 14:00













        32














        PHP Manual says




        break accepts an optional numeric
        argument which tells it how many
        nested enclosing structures are to be
        broken out of.




        break 2;





        share|improve this answer



























          32














          PHP Manual says




          break accepts an optional numeric
          argument which tells it how many
          nested enclosing structures are to be
          broken out of.




          break 2;





          share|improve this answer

























            32












            32








            32







            PHP Manual says




            break accepts an optional numeric
            argument which tells it how many
            nested enclosing structures are to be
            broken out of.




            break 2;





            share|improve this answer













            PHP Manual says




            break accepts an optional numeric
            argument which tells it how many
            nested enclosing structures are to be
            broken out of.




            break 2;






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered May 4 '11 at 8:13









            Shakti SinghShakti Singh

            67.9k17 gold badges119 silver badges142 bronze badges




            67.9k17 gold badges119 silver badges142 bronze badges





















                15














                You can using just a break-n statement:



                foreach(...)

                foreach(...)

                if(i.name == j) break 2; //Breaks 2 levels, so breaks outermost foreach




                If you're in php >= 5.3, you can use labels and gotos, similar as in action script:



                 foreach(...)

                foreach(...)

                if(i.name == j) goto top;


                top :


                But goto must be used carefully. Goto is evil (considered bad practice)






                share|improve this answer




















                • 1





                  There are quite valid uses for goto. Even eval() is not evil (and it is). It has even less uses than goto.

                  – lucian303
                  May 31 '13 at 19:14






                • 1





                  Yes. That's why I said "goto must be used carefully"

                  – Edgar Villegas Alvarado
                  Aug 29 '13 at 8:05











                • In that note I believe this page is relevant: php.net/manual/en/control-structures.goto.php

                  – Ruggi
                  May 19 '16 at 14:14
















                15














                You can using just a break-n statement:



                foreach(...)

                foreach(...)

                if(i.name == j) break 2; //Breaks 2 levels, so breaks outermost foreach




                If you're in php >= 5.3, you can use labels and gotos, similar as in action script:



                 foreach(...)

                foreach(...)

                if(i.name == j) goto top;


                top :


                But goto must be used carefully. Goto is evil (considered bad practice)






                share|improve this answer




















                • 1





                  There are quite valid uses for goto. Even eval() is not evil (and it is). It has even less uses than goto.

                  – lucian303
                  May 31 '13 at 19:14






                • 1





                  Yes. That's why I said "goto must be used carefully"

                  – Edgar Villegas Alvarado
                  Aug 29 '13 at 8:05











                • In that note I believe this page is relevant: php.net/manual/en/control-structures.goto.php

                  – Ruggi
                  May 19 '16 at 14:14














                15












                15








                15







                You can using just a break-n statement:



                foreach(...)

                foreach(...)

                if(i.name == j) break 2; //Breaks 2 levels, so breaks outermost foreach




                If you're in php >= 5.3, you can use labels and gotos, similar as in action script:



                 foreach(...)

                foreach(...)

                if(i.name == j) goto top;


                top :


                But goto must be used carefully. Goto is evil (considered bad practice)






                share|improve this answer















                You can using just a break-n statement:



                foreach(...)

                foreach(...)

                if(i.name == j) break 2; //Breaks 2 levels, so breaks outermost foreach




                If you're in php >= 5.3, you can use labels and gotos, similar as in action script:



                 foreach(...)

                foreach(...)

                if(i.name == j) goto top;


                top :


                But goto must be used carefully. Goto is evil (considered bad practice)







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited May 12 '14 at 5:33

























                answered May 4 '11 at 8:17









                Edgar Villegas AlvaradoEdgar Villegas Alvarado

                16.6k1 gold badge34 silver badges54 bronze badges




                16.6k1 gold badge34 silver badges54 bronze badges







                • 1





                  There are quite valid uses for goto. Even eval() is not evil (and it is). It has even less uses than goto.

                  – lucian303
                  May 31 '13 at 19:14






                • 1





                  Yes. That's why I said "goto must be used carefully"

                  – Edgar Villegas Alvarado
                  Aug 29 '13 at 8:05











                • In that note I believe this page is relevant: php.net/manual/en/control-structures.goto.php

                  – Ruggi
                  May 19 '16 at 14:14













                • 1





                  There are quite valid uses for goto. Even eval() is not evil (and it is). It has even less uses than goto.

                  – lucian303
                  May 31 '13 at 19:14






                • 1





                  Yes. That's why I said "goto must be used carefully"

                  – Edgar Villegas Alvarado
                  Aug 29 '13 at 8:05











                • In that note I believe this page is relevant: php.net/manual/en/control-structures.goto.php

                  – Ruggi
                  May 19 '16 at 14:14








                1




                1





                There are quite valid uses for goto. Even eval() is not evil (and it is). It has even less uses than goto.

                – lucian303
                May 31 '13 at 19:14





                There are quite valid uses for goto. Even eval() is not evil (and it is). It has even less uses than goto.

                – lucian303
                May 31 '13 at 19:14




                1




                1





                Yes. That's why I said "goto must be used carefully"

                – Edgar Villegas Alvarado
                Aug 29 '13 at 8:05





                Yes. That's why I said "goto must be used carefully"

                – Edgar Villegas Alvarado
                Aug 29 '13 at 8:05













                In that note I believe this page is relevant: php.net/manual/en/control-structures.goto.php

                – Ruggi
                May 19 '16 at 14:14






                In that note I believe this page is relevant: php.net/manual/en/control-structures.goto.php

                – Ruggi
                May 19 '16 at 14:14












                12














                You can use break 2; to break out of two loops at the same time. It's not quite the same as your example with the "named" loops, but it will do the trick.






                share|improve this answer



























                  12














                  You can use break 2; to break out of two loops at the same time. It's not quite the same as your example with the "named" loops, but it will do the trick.






                  share|improve this answer

























                    12












                    12








                    12







                    You can use break 2; to break out of two loops at the same time. It's not quite the same as your example with the "named" loops, but it will do the trick.






                    share|improve this answer













                    You can use break 2; to break out of two loops at the same time. It's not quite the same as your example with the "named" loops, but it will do the trick.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered May 4 '11 at 8:13









                    JonJon

                    356k61 gold badges630 silver badges725 bronze badges




                    356k61 gold badges630 silver badges725 bronze badges





















                        6














                         $i = new MovieClip();
                        foreach($movieClipArray as $i)

                        $nameArray = array();
                        foreach($nameArray as $n) if($i->name==$n) break 2;






                        share|improve this answer























                        • Nice try at converting the entire supplied code to PHP, though the break statement doesn't do what I need it to do (it only ends the inner loop).

                          – Marty
                          May 4 '11 at 8:18












                        • refresh you page :) I replaced with break 2 ... which according to PHP Manual: "break accepts an optional numeric argument which tells it how many nested enclosing structures are to be broken out of. "

                          – Jordan Arseno
                          May 4 '11 at 8:22















                        6














                         $i = new MovieClip();
                        foreach($movieClipArray as $i)

                        $nameArray = array();
                        foreach($nameArray as $n) if($i->name==$n) break 2;






                        share|improve this answer























                        • Nice try at converting the entire supplied code to PHP, though the break statement doesn't do what I need it to do (it only ends the inner loop).

                          – Marty
                          May 4 '11 at 8:18












                        • refresh you page :) I replaced with break 2 ... which according to PHP Manual: "break accepts an optional numeric argument which tells it how many nested enclosing structures are to be broken out of. "

                          – Jordan Arseno
                          May 4 '11 at 8:22













                        6












                        6








                        6







                         $i = new MovieClip();
                        foreach($movieClipArray as $i)

                        $nameArray = array();
                        foreach($nameArray as $n) if($i->name==$n) break 2;






                        share|improve this answer













                         $i = new MovieClip();
                        foreach($movieClipArray as $i)

                        $nameArray = array();
                        foreach($nameArray as $n) if($i->name==$n) break 2;







                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered May 4 '11 at 8:17









                        Jordan ArsenoJordan Arseno

                        4,8005 gold badges40 silver badges88 bronze badges




                        4,8005 gold badges40 silver badges88 bronze badges












                        • Nice try at converting the entire supplied code to PHP, though the break statement doesn't do what I need it to do (it only ends the inner loop).

                          – Marty
                          May 4 '11 at 8:18












                        • refresh you page :) I replaced with break 2 ... which according to PHP Manual: "break accepts an optional numeric argument which tells it how many nested enclosing structures are to be broken out of. "

                          – Jordan Arseno
                          May 4 '11 at 8:22

















                        • Nice try at converting the entire supplied code to PHP, though the break statement doesn't do what I need it to do (it only ends the inner loop).

                          – Marty
                          May 4 '11 at 8:18












                        • refresh you page :) I replaced with break 2 ... which according to PHP Manual: "break accepts an optional numeric argument which tells it how many nested enclosing structures are to be broken out of. "

                          – Jordan Arseno
                          May 4 '11 at 8:22
















                        Nice try at converting the entire supplied code to PHP, though the break statement doesn't do what I need it to do (it only ends the inner loop).

                        – Marty
                        May 4 '11 at 8:18






                        Nice try at converting the entire supplied code to PHP, though the break statement doesn't do what I need it to do (it only ends the inner loop).

                        – Marty
                        May 4 '11 at 8:18














                        refresh you page :) I replaced with break 2 ... which according to PHP Manual: "break accepts an optional numeric argument which tells it how many nested enclosing structures are to be broken out of. "

                        – Jordan Arseno
                        May 4 '11 at 8:22





                        refresh you page :) I replaced with break 2 ... which according to PHP Manual: "break accepts an optional numeric argument which tells it how many nested enclosing structures are to be broken out of. "

                        – Jordan Arseno
                        May 4 '11 at 8:22











                        4














                        Use goto?



                        for($i=0,$j=50; $i<100; $i++) 

                        while($j--)

                        if($j==17)
                        goto end;


                        echo "i = $i";
                        end:
                        echo 'j hit 17';





                        share|improve this answer



























                          4














                          Use goto?



                          for($i=0,$j=50; $i<100; $i++) 

                          while($j--)

                          if($j==17)
                          goto end;


                          echo "i = $i";
                          end:
                          echo 'j hit 17';





                          share|improve this answer

























                            4












                            4








                            4







                            Use goto?



                            for($i=0,$j=50; $i<100; $i++) 

                            while($j--)

                            if($j==17)
                            goto end;


                            echo "i = $i";
                            end:
                            echo 'j hit 17';





                            share|improve this answer













                            Use goto?



                            for($i=0,$j=50; $i<100; $i++) 

                            while($j--)

                            if($j==17)
                            goto end;


                            echo "i = $i";
                            end:
                            echo 'j hit 17';






                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered May 4 '11 at 8:16









                            Petr AbdulinPetr Abdulin

                            24.5k6 gold badges49 silver badges83 bronze badges




                            24.5k6 gold badges49 silver badges83 bronze badges



























                                draft saved

                                draft discarded
















































                                Thanks for contributing an answer to Stack Overflow!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid …


                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.

                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f5880442%2fhow-can-i-break-an-outer-loop-with-php%23new-answer', 'question_page');

                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

                                155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

                                Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?