我有一個數組對象,並在採用了棱角分明的js僅低於對象選擇標籤顯示是我的數組對象如何在選擇放置中顯示數組對象?
"matcherObject": {
"Percentage Off": [
{
"dealType": "Percentage Off",
"subCategory": "16% to 20%",
"recid": 2
},
{
"dealType": "Percentage Off",
"subCategory": "10 to 15 %",
"recid": 1
},
{
"dealType": "Percentage Off",
"subCategory": "21% to 25%",
"recid": 3
}
],
"Special Deals based on the event": [
{
"dealType": "Special Deals based on the event",
"subCategory": "Buy 1 get one entr",
"recid": 52
},
{
"dealType": "Special Deals based on the event",
"subCategory": "Buy 1 get one entr",
"recid": 54
}
]
};
這個對象我要如何選擇標籤,請幫我解決這個問題。 圖像如何在用戶界面顯示如下圖:
如果我選擇標記的NG-模型應該如下格式顯示如下
{"dealType": "Percentage Off","subCategory": "16% to 20%","recid": 2}
要在下拉列表顯示什麼? –
下拉我必須顯示子類別名稱 –
**請幫助減緩此問題** –