Here is the information I have:
{product_quantity: {quantity: 13, code: "AAA", warehouse: "1000",}}
The product_quantity field is part of a JSON object in a MongoDB database.
I am looking to convert it into this format:
{"product_quantity": [{"quantity": 13, "code": "AAA", "warehouse": "1000"}]}
Is there a way to transform an object into an array with its keys and values?
Thank you for your help.