jQuery 2.0 | Replace each div text with substring from comma delimited string

jQuery 2.0 | Replace each div text with substring from comma delimited string

Hidden #main-input contains a string of comma-separated values. I need to find all same class divs that each contain same unique text and replace that text with the relevant comma-delimited substrings stored in #main-input, like so:

1- Find the first .container div that only contains the text "findme";
2- Replace "findme" with the first comma-delimited substring of hidden #main-input;
3- Find the second .container div that only contains the text "findme";
4- Replace "findme" with the second comma-delimited substring of hidden #main-input;
... continue to last .container div.

The code snippet below demonstrates how thing would work. Those .container divs are dynamically appended with their parent li to parentUL via ajax call which terminates like so:...
  1. . . .
  2. $.when.apply(null,defArray).done(function(){
  3. $('#parentUL').append('<li><div class="container">findme</div></li>');
  4. });
... which resulting sample html would look like this:

  1. <#parentUL>
  2. <li><div class="container">hiThere</div></li>
  3. <li><div class="container">63AB</div></li> // First findme replaced by 63AB
  4. <li><div class="container">Whatever</div></li>
  5. <li><div class="container">Ha72</div></li> // Second findme replaced by Ha72
  6. <li><div class="container">7kK3</div></li> // Third findme replaced by 7kK3
  7. <li><div class="container">NevaMind</div></li>
  8.  . . .</ul>
  9. <input type="hidden" id="main-input" /> // C.S.V.= 63AB,Ha72,7kK3

Doesn't matter whether the code would interact during each append or after all append is done, I just don't know what efficient code would do the job in a jiffy. Any help is greatly appreciated. ~ dan