title: loop between a nested object array and another array
body: <p>I have two arrays, one it normal array and other is object array.
   All I want here is show me how to make a loop between both of them to get "<strong>Jhon</strong>" is <strong>good</strong> and sum of (midterm+finalterm)
  In a :
  the first no is no of school, the second is class>> i will use .split("|") to make them in an array 
  In b: object array</p>
  
  <blockquote>
    <p>I don't want the whole code, just the loop and if condition </p>
  </blockquote>
  
  <p>the function will compare 1|1 in a with school_no and class_no to match</p>
  
  <p>but I want if condition to color the name of the student based on evaluation like red for bad and blue for good.</p>
  
  <p>here the arrays</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>a=["1|1|Jhon","1|2|Akram","1|3|Mali"]
      //first no for school no
      //second no for class no.
      b= [{
          "result": [
            {
              "midterm": 25,
              "evaluation": "good",
              "finalterm": 24
            }
          ],
          "school  _no": 1,
          "class_no": 1
        },
        {
          "result": [
            {
              "midterm": 55,
              "evaluation": "verygood",
              "finalterm": 60
            }
          ],
          "school_no": 1,
          "class_no": 2
        },
      {
          "result": [
            {
              "midterm": 11,
              "evaluation": "bad",
              "finalterm": 12
            }
          ],
          "school_no": 1,
          "class_no": 3
        }
      
      ];
      console.log(a);
      console.log(b);</code></pre>
  </div>
  </div>
  </p>
  
  <p>this is not a homework yet it's a small example of something bigger I'm working on. </p>