Skip to main content

All Questions

Tagged with
0 votes
1 answer
45 views

Display MongoDB collection data using PUG (Error: Array Undefined)

I am trying to display the data from my "users" collection in my MongoDB but receiving an undefined error with the array. In my user controller file, I have imported express, express.router ...
RAD140's user avatar
  • 61
0 votes
1 answer
115 views

How to read an array inside another array in an " Json object" -> Jade/PUG.js

I'm trying to "create" a template using "Json" in Pug, but there is a point where I need to put much Information. But the problem for me becomes where I need to read an element ...
The Norman James's user avatar
0 votes
1 answer
83 views

How te read Object in Jade Pug?

I have this JSON that I send to the PUG page from router.get with the name of prices [{"space2":{"actualPrice":"$ 99.990","oldPrice":"$ 129.990",&...
Jordan Torres's user avatar
0 votes
1 answer
848 views

How to iterate an array of objects and list key & value in pug

I'm trying to dislay errors from an incomplete form. I have an array containing objects and would like to loop through the array and get the errors in it. However the list is empty. The debugger shows ...
uhexos's user avatar
  • 391
0 votes
1 answer
136 views

Java arraylist elements update, Jade

Now I want to build an ArrayList MessageQueue, and it will automatically fill in the messages from the MQTT broker. For example, if there are three messages sent from MQTT, then in MessageQueue, there ...
James's user avatar
  • 155
0 votes
1 answer
206 views

defining array in pug.js

I can't understand the difference. What is wrong here? Whenever I write it like this in pug— -const users =[ { "key":"Property", "key":"Property"...
Aneeq Ak's user avatar
1 vote
1 answer
343 views

How to visualize specific object keys in pug?

from this request: router.get('/weather', function(req, res, next) { requestify.get('https://api.weatherbit.io/v2.0/current?city=Trenton,TN&key=myKey').then(function(response) { // Get the ...
Pelide's user avatar
  • 518
0 votes
1 answer
231 views

mongoose array saved in wrong order or got error 'Cast to string failed for value' if schema for array is defined

i work on a productivity app with a feature that people can select several items from a list of predefined items (tasks) to build a set of personal daily tasks and optionally fill one input field to ...
user549385's user avatar
0 votes
1 answer
315 views

How to convert a array of objects into string in nodejs?

[ RowDataPacket { House_Name: 'Merlin 5th Avenue', no_of_rooms: 6, Cost: 3400000, PropertyId: 2 }, RowDataPacket { House_Name: 'Presidential Building', no_of_rooms: 5, ...
Soumyajit Deb's user avatar
0 votes
1 answer
187 views

Loop into Array of Objects comparing two arrays - PUG (Jade)

I am trying in Javascript, using PUG template (if possible), to compare two arrays and when I find a correspondance in IDs, display some particular elements. // First Array : I iterate over "hearts" ...
Said951's user avatar
  • 21
0 votes
0 answers
81 views

Why does function A work and function B throw an error?

I have 2 functions, one works and the other does not - the reason the second function is more important is that essentially I want to be able to change what's in the final array. Deconstruction is ...
Jason Harder's user avatar
4 votes
1 answer
386 views

How to extract the value of each first item in Pug array

I'm trying to get the first item in this array using Pug. - val newx = {'O1_Carmine':'#E54A34', 'O2_Lipstick':'#D04735'} each val,index in newx .span2(style={ background: val, color: 'black', ...
ianhobbs's user avatar
0 votes
1 answer
2k views

Creating a table properly from a JSON object in pug

I am trying to break my JSON object into their individual elements and dynamically populate a table.) Tried doing a sort of map with pug I guess (to dynamically populate the table. tr ...
Jason Harder's user avatar
1 vote
1 answer
166 views

Why can't Pug iterate through some of my arrays/objects that came from a child template?

So I have a file called base-default.pug, which sets up my head and body tag. I have a file that extends it called index.pug. It only contains two Javascript objects: localHeadProps: an object of ...
Deluxateer's user avatar
-1 votes
1 answer
45 views

Jade - Trying display collection data from mongodb

i want to display data from mongodb collection i am using pug for and want to display my data collection in mongodb but i have no idea, about this error i have tried this it's my .pug file ...
Agust Rinaldo Kurniawan's user avatar

15 30 50 per page