Reputation: 156
I am facing a problem while fetching the particular array;
ATM/Cash ( each id from array(11) )
-id:2998390918
-id:2998390990
.
.
.
-id:2999363236
Account Transfer ( each id from array(30) )
-id:2998390928
-id:2998390929
.
.
.
-id:2998390979
. . .
Upvotes: 1
Views: 66
Reputation: 5923
Loop over object and print
var o = {
"Healthcare/Medical":
Array(167),
"Personal Care":
Array(88),
Miscellaneous_Services:Array(340),
General_Merchandise:Array(110),
Home_Improvement:Array(292)
};
Object.keys(o).forEach((k)=>{
console.log(k);
o[k].forEach((e)=>{
console.log(`-id[${e.id}]`);
});
});
Upvotes: 1