{
"myservices": [
{
"name": "oozie",
"hostidn": "1",
"details": "failed process health monitor....",
"currstatus": "Warning",
"currstatusclass": "warning"
},
{
"name": "oozie",
"hostidn": "2",
"details": "failed process health monitor....",
"currstatus": "Warning",
"currstatusclass": "warning"
},
{
"name": "oozie",
"hostidn": "3",
"details": "failed process health monitor....",
"currstatus": "Warning",
"currstatusclass": "warning"
},
{
"name": "oozie",
"hostidn": "4",
"details": "failed process health monitor....",
"currstatus": "Warning",
"currstatusclass": "warning"
},
{
"name": "oozie",
"hostidn": "5",
"details": "failed process health monitor....",
"currstatus": "Warning",
"currstatusclass": "warning"
},
{
"name": "single-namenode",
"hostidn": "2",
"details": "failed process health monitor....",
"currstatus": "Warning",
"currstatusclass": "warning"
}
]
}
在运行并显示它们之前,我希望找到最高的“hostidn”,它是第N个数字,可以是唯一数字,也可以有数百个重复项。我的目标是找到最高的一个,并基于它进行for或while循环,以在视觉显示中将它们分组在一起。示例:注意下面有一个带有数字2的hostidn,而其余所有数字都有自己的数字。我想将具有2个数字的两个组合在一起,以便在显示框中显示,但在这种情况下有5个不同的hostidn。也许我想错了,我会接受建议。