1
I need to take a JSON that returns from Mongodb and through a foreach generate a table and create a PDF, but I’m not able to adapt the JSON to the pdfMake structure, follows JSON excerpt:
{
"_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 took the data from the Jsonplaceholder site and saved it on Mongodb, and now I can’t adapt it to the pdfMake structure. I need you to return all keys, including the "_id", because I want to print all 5 in the table. Thanks in advance.
Leonardo asks the question of
preencherPDF
tb.– BrTkCa