Created
January 16, 2017 13:47
-
-
Save firehawk895/49a607922c0d02776980e7b533e69fa7 to your computer and use it in GitHub Desktop.
Grofers expense calculator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the_json.carts.forEach(function(cart) { | |
total_cost = cart.total_cost | 0 | |
cashback = cart.cashback.applied_value | 0 | |
refund = cart.refund.applied_value | 0 | |
total = total + total_cost - cashback - refund | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment