我遇到了一种情况,我必须在表格中显示以下响应。
[
{
"name": "Test",
"endPointURI": "http://10.10.10.1:123",
"successCount": 0,
"failureCount": 3761,
"successRate": 0.0,
"failureRate": 5.980012278871403,
"totalSent": 3761.0,
"totalSendRate": 5.980012307671908,
"latency": 0,
"oneMinuteSuccessRate": 0.0,
"fiveMinuteSuccessRate": 0.0,
"fifteenMinuteSuccessRate": 0.0,
"oneMinuteFailureRate": 9.971719382874516,
"fiveMinuteFailureRate": 23.609469948078925,
"fifteenMinuteFailureRate": 77.78484853747226,
"oneMinuteSendRate": 9.913005632492993,
"fiveMinuteSendRate": 23.60190467615165,
"fifteenMinuteSendRate": 77.7832824814743,
"lastSentSuccessTime": 0,
"sendRate": 5.980012307671908
},
[
{
"name": "Test2",
"endPointURI": "http://10.10.10.1:123",
"successCount": 0,
"failureCount": 3761,
"successRate": 0.0,
"failureRate": 5.980012278871403,
"totalSent": 3761.0,
"totalSendRate": 5.980012307671908,
"latency": 0,
"oneMinuteSuccessRate": 0.0,
"fiveMinuteSuccessRate": 0.0,
"fifteenMinuteSuccessRate": 0.0,
"oneMinuteFailureRate": 9.971719382874516,
"fiveMinuteFailureRate": 23.609469948078925,
"fifteenMinuteFailureRate": 77.78484853747226,
"oneMinuteSendRate": 9.913005632492993,
"fiveMinuteSendRate": 23.60190467615165,
"fifteenMinuteSendRate": 77.7832824814743,
"lastSentSuccessTime": 0,
"sendRate": 5.980012307671908
}]
我在这里有“名称”作为我的唯一键。
给定一个名称,我想返回具有“名称”的 JSON(或 javascript 对象)。
我在这里真的很困惑。有人可以帮忙吗?