Get Values of array with reference to other array
<p>I have an array <code>a= ["APP","COM", "REJ" , "COM APP"]</code> and <code>b= [23,54,56,24].</code> <code>A and B</code> are of equal length.
How to get all elements of array B, in which the values of array a contains VALUE as APP </p>

<p>here in array a there is an APP in APP , COM APP , how to `return [23, 24] as a an array.</p>