I have a multidimensional array like this:
var allObj = {'@DB M-T 1@': 'DB More Than 1','@ES L-T 5@': 'ES Less Than 5','@MM E-Q 0@': 'MM Equal 0'};
and I have a criteria like this:
var criteriaArray = {'DB More Than 1','MM Equal 0'};
I would like to create a new array out of the allObj array, such that it meets the values in criteriaArray. The output should look like this:
var matchObj = {'@DB M-T 1@': 'DB More Than 1','@MM E-Q 0@': 'MM Equal 0'};
From what I gather, I can use jquery grep. But I can't figure out how to do it correctly. I would appreciate if someone can help me. I've been on this for hours.
criteriaArrayas['DB More Than 1','MM Equal 0']