why duplicate my code $.each, please help

why duplicate my code $.each, please help

hi.
I have problem with my code, need to compare to arrays, and next compare my two arrays, this result append in a div, my problem code is here:
array1, array2
for( i = 0; i < array2.length; i++ ){
if( array1[i] == array2[i] ){ /* in here is correct*/
console.log(array2[i]); /* is correct just show me two elements*/
//console.log(arrayh3.length);
            // the problem is below code this repeat two times in div.prometheus-about
jQuery('.prometheus-about > h3').append('<div id="'+array2[i]+'"></div>');
}
}
my problem is inside div.prometheus-about > h3 like this 
<div class="prometheus-about">
      <h3> 
            <div class="anything1"></div>
            <div class="anything2"></div>
      <h3/>
</div>
and I need to just a one time like this
<div class="prometheus-about">
      <h3> 
            <div class="anything1"></div>
      <h3/>
</div>
<div class="prometheus-about">
      <h3> 
            <div class="anything2"></div>
      <h3/>
</div>
please help me, I do not know why repeat two times with my code.
thank.