How to I break out of the following jquery each method when a condition is met;
var rainbow = {\'first\' : \'red\', \'second\' : \'orange\',
As explicitly written on jQuery's page for $.each :
We can break the $.each() loop at a particular iteration by making the callback function return false. Returning non-false is the same as a continue statement in a for loop; it will skip immediately to the next iteration.
Please google the terms you search before posting here ! It's a pity that jQuery has one of the best documentations ever if you do not bother to read about it !