Here is a JSON object I received:
[{"model": "pricing.cashflow", "pk": 1, "fields": {"value": 4.0, "date": "2016-09-09"}}, {"model": "pricing.cashflow", "pk": 2, "fields": {"value": 3.0, "date": "2016-09-01"}}, {"model": "pricing.cashflow", "pk": 3, "fields": {"value": 3.0, "date": "2016-09-01"}}, {"model": "pricing.cashflow", "pk": 4, "fields": {"value": 3.0, "date": "2016-09-01"}}, {"model": "pricing.cashflow", "pk": 5, "fields": {"value": 3.0, "date": "2016-09-01"}}, {"model": "pricing.cashflow", "pk": 6, "fields": {"value": 5.0, "date": "2016...
I am looking to extract the values of "value" and "date" from this JSON data. I attempted to achieve that using the following method (what would be the correct approach normally?) but encountered an issue..
$http.get("/getcashflow/")
.success(function(data) {
for(var cf in data){
alert(cf.fields.value.data*);
}
});
};