Count number of matching words from an array of words with another array of sentence in Javascript : <pre><code>var word_array = ['apple', 'mango', 'school'];

var sentences = [
{name: 'Jon', info: 'Jon takes apple in school'},
{name: 'Anna', info: 'Anna loves to eat mango'},
{name: 'Dani', info: 'Dani wants to go to park today'} 
];
</code></pre>

<p>I want to count the matched words for each names of the sentences.</p>

<pre><code>Output:
Result = [
{name: 'Jon', count: 2},
{name: 'Anna', count: 1},
{name: 'Dani', count: 0}
];
</code></pre>
