How to calculate sum of a specific model(attributes) in collection in Backbone : I am new to Backbone and facing one issue in which i need to calculate the specific values of my models inside my collection.

For the reference i am pasting the collection of accounts, from which i need to calculate the sum of acquisitionCost, units and netGainLoss of all the models,
i.e after calulating the acquisitionCost i should get: 1900 and one thing we need to take care is the values are coming in string form like shown in the json.

{
	"accounts": [{
			"accountNumber": "AS10000642",
			"assets": {
				"assetName": "ABCDEF GHIJKLM",
				"isin": "GB0008533564",
				"grossProfit": {
					"acquisitionCost": "500",
					"units": "10",
					"netGainLoss": "20"
				}

			}
		},
		{
			"accountNumber": "AS10000642",
			"assets": {
				"assetName": "ABCDEF GHIJKLM",
				"isin": "GB0008533564",
				"grossProfit": {
					"acquisitionCost": "1000",
					"units": "10",
					"netGainLoss": "20"
				}

			}
		},
		{
			"accountNumber": "AS10000407",
			"assets": {
				"assetName": "ABCDEF GHIJKLM",
				"isin": "GB0008533564",
				"grossProfit": {
					"acquisitionCost": "400",
					"units": "10",
					"netGainLoss": "20"
				}

			}
		}
	]
}

Please assist me with this . thanks in advance.
