I'm sorry, I don't have an example. To sum the numbers, you would be using JavaScript. A REST service would only return the values which you would save into an array.
I'm sorry, I don't have an example. To sum the numbers, you would be using JavaScript. A REST service would only return the values which you would save into an array.
Can you show me how to save values returned from a REST service into an array ?
Thanks
Hi,
Sure. Please take a look at here: http://docs.appery.io/tutorials/build...
I can do this bit, but how to get data into an array for performing calculations programmatically.
I see, this should help you: https://getsatisfaction.com/apperyio/...
Hi there,
i want to do sum up data by groupby. i found some stuff on the mongodb site as follows:
Calculate the Sum
The following example groups by the ord_dt and item.sku fields those documents that have ord_dt greater than 01/01/2012 and calculates the sum of the qty field for each grouping:
db.runCommand(
{ group:
{
ns: 'orders',
key: { ord_dt: 1, 'item.sku': 1 },
cond: { ord_dt: { $gt: new Date( '01/01/2012' ) } },
$reduce: function ( curr, result ) {
result.total += curr.item.qty;
},
initial: { total : 0 }
}
}
)
how can i map that ugly stuff into your great beginner friendly Appery engine ?
I found a bypass to my above question.
best
Hello EJLD,
Thanks for your update.
Regards.