我想过滤一个考虑多个attribute值的对象数组。使用复选框选择属性,我想使用这些值(例如,,)过滤Ram数组Primary camera。
我想像电子商务网站一样过滤:
var myObject = [
{
"ProId": 12,
"ProName": "Samsung Galaxy A9",
"AttriValue": {
"Front Camera": "16 MP and Above",
"Internal Memory": "128 GB and Above",
"Network Type": "4G",
"Primary Camera": "16 MP and Above",
"Ram": "6 GB"
}
},
{
"ProId": 11,
"ProName": "Vivo Y95",
"AttriValue": {
"Front Camera": "16 MP and Above",
"Internal Memory": "64 GB",
"Network Type": "4G",
"Primary Camera": "13 - 15.9 MP",
"Ram": "4 GB"
}
},
{
"ProId": 10,
"ProName": "OPPO A7",
"AttriValue": {
"Front Camera": "16 MP and Above",
"Internal Me...
....
}
]
