I have an array like this,
0:{tag_20: "2018051607234047", tag_12: "700", tag_20_credit_n: "529010804376-S"}
based on the above array I want to create new array like this
0:{code: "tag_20", property: "2018051607234047"} 1:{code: "tag_12", property: "700"} 2:{code: "tag_20_credit_n", property: "529010804376-S"}
I'm new this key value concept and angularjs so far I tried with this
var log = []; angular.forEach(values, function(value, key) { this.push('code: ' + key + ' property: ' + value); }, log);
but getting error.