Please find my json array, I want to form array of data in below format:
[Sunday.a_count.value, Monday.a_count.value, Tuesday.a_count.value, Wednesday.a_count.value] - This format output will be [0, 2, 2, 3] -
Eventually, these values come from Sunday a_count, Monday a_count, Tuesday a_count and Wednesday a_count.
I'm not able to form the data in above format using below json in javascript, if someone can help to achieve this it will be really helpful.
Thanks!
[ {
"day" : "Sunday",
"a_count" : 0,
"b_count" : 2,
"c_count" : 0,
"d_count" : 0
}, {
"day" : "Monday",
"a_count" : 2,
"b_count" : 0,
"c_count" : 0,
"d_count" : 0
}, {
"day" : "Tuesday",
"a_count" : 2,
"b_count" : 0,
"c_count" : 0,
"d_count" : 0
}, {
"day" : "Wednesday",
"a_count" : 3,
"b_count" : 0,
"c_count" : 0,
"d_count" : 0
} ]