I have an object
const myObject = {rice : 10, wheat: 20, sugar: 3}
I would like to convert it to an array of object:
myArray = [
{"product" : rice, "QTY" : 10},
{"product" : wheat, "QTY" : 20},
{"product" : sugar, "QTY" : 3}
]
Please help. Thanks.