到目前为止,这就是我所做的
<div class="dropdown">
<p class="filter-text">LANGUAGE</p>
<select class="selection" name="language" multiple id="lang">
<option value="CH">Chinese</option>
<option value="EN">English</option>
<option value="JP">Japanese</option>
</select>
</div>
JS:
`$("#language :selected").map(function ( i, el ) {
var values = $(el).val();
console.log(values);
// customfilter(values);
});
function custonfilter(){
....//HELP//
}`
我的json来自ajax请求,看起来像:
var json=[{marketName: "Asia",language:english},
{marketName: "Asia",language:chinese},{marketName: "Asia",language:japanese},
…}]
因此,当用户检查英语时,我的新json shud包含所有带有language = english的行。