次のノード js スクリプトを使用して、mysql の結果セット全体を配列形式で取得します。どのように削除できますか?
var pricingDetail = function(resourceIdentifiers,callback){
dbconnection.execute(function(err,response){
if(err){
throw err;
}
else
{
var selectqueryString = "call SP_ExposePricingDetailforUI('" + resourceIdentifiers + "')";
response.query(selectqueryString, function(err, result){
if(err) {
throw err;
}
else
{
callback(result);
}
});
}
});
};
結果 :
[
{
"ResourceIdentifier": "vm/hpcloud/nova/small",
"chargeAmount": 0.071,
"ChargeAmountUnit": "per hour",
"CurrencyCode": "USD"
},
{
"ResourceIdentifier": "vm/hpcloud/nova/large",
"chargeAmount": 0.49,
"ChargeAmountUnit": "per hour",
"CurrencyCode": "USD"
},
{
"ResourceIdentifier": "vm/hpcloud/nova/large",
"chargeAmount": 0.49,
"ChargeAmountUnit": "per hour",
"CurrencyCode": "USD"
},
{
"ResourceIdentifier": "vm/hpcloud/nova/large",
"chargeAmount": 0.8,
"ChargeAmountUnit": "per hour",
"CurrencyCode": "USD"
},
{
"ResourceIdentifier": "vm/hpcloud/nova/large",
"chargeAmount": 0.8,
"ChargeAmountUnit": "per hour",
"CurrencyCode": "USD"
},
{
"ResourceIdentifier": "vm/hpcloud/nova/large",
"chargeAmount": 0.78,
"ChargeAmountUnit": "per hour",
"CurrencyCode": "USD"
},
{
"ResourceIdentifier": "vm/hpcloud/nova/large",
"chargeAmount": 0.78,
"ChargeAmountUnit": "per hour",
"CurrencyCode": "USD"
}
]