I need to get a JSON that returns from MongoDB and through a forEach generate a table and create a PDF, however I am not able to adapt the JSON to the structure of pdfMake, follows JSON:
{
"_id" : ObjectId("5978e9f71277a5dae49db945"),
"userNumId" : 1,
"numId" : 1,
"titulo" : "sunt aut facere repellat provnumIdent occaecati excepturi optio reprehenderit",
"texto" : "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
}
This is just a JSON document, I got the data from the JSONPlaceholder site and saved it to MongoDB, and now I can not adapt to the pdfMake structure. I need to return all the keys, including "_id", because I want to print all 5 in the table. Thank you very much in advance.