I am trying to create a series of new objects using the values from an existing object to push to my database. Here is the existing object: Basically I have a function that inserts and returns the id of the recipe into one table, then inserts and returns/or finds the ids of the relevant ingredients and the fi…
Tag: javascript
Ajax GET Request inside ajax post request?
Is it possible to make an ajax request inside another ajax request? because I need some data from first ajax request to make the next ajax request. I tried to make a script, but i see that instead of GET, my request is POST and i dont know where is the problem.. Answer My code works perfectly, the real proble…
Dynamically append the element through JavaScript Dom
Hers’s question which I need answer Exercises: Level 1 Question 1 I tried to append the child dynamically and get the result vertical not in the compact manner as you will see in the question output when you go to the link You can see the code of both HTML and javascript above!!! Do help with the code w…
How to fix “TypeError: props.scoreboard.map is not a function”, only after refresh
I’m having an odd issue when I’m trying to loop over my response from my backend. I’ve seen similar questions and they seem to point to the response not being an array, but logging my response does indeed result in an array. I’m passing the scoreboard prop to the scoreBoardItem which w…
Sorting date by date and month excluding an year in typescript [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 8 months ago. Improve this question I need to sort an array having date and month as input. ex: date = [“01-jun”,&#…
Change text in element when another element is hovered over
I have three button elements and depending on which button is hovered over I want the text box to have a diffrent text. When not hovering over the buttons text element should have “See details here”. I would like to have 20 buttons is there a better solution than the one below? Answer Use an objec…
MissingSchemaError: Schema hasn’t been registered for model “User, userSchema”. Use mongoose.model(name, schema)
hope you’re doing well. i’m following a tutorial ( from 2019 ), and i’m facing this error at the moment. here’s the code. ( let me know if you need anything else ) // index.js // // User.js // // auth.js // Thank you in advance. The Lord be with you and save you all, your families and …
RangeError: Maximum call stack size exceeded (getting this error on multiple async/await calls)
RangeError: Maximum call stack size exceeded On using multiple async/await i am getting error RangeError: Maximum call stack size exceeded I think the stack size is fulled on calling so many async functions but if not so how do i achieve same functionality that this code would have achieved if it doesn’…
How can I access the name/key of a bool (not its value)?
New to coding and working in JavaScript. I’m sure there’s a simple way to do this but it’s been hard to pinpoint with Google searches. I’m trying to find a JavaScript function or something of the sort that will find the name of a bool in an array (not the bool’s value) and return…
How to create dto of an complex object in NestJs
I’m a beginner at NestJs and I want to create a dto of the following struct: I want to create an API that can return this object using DTOs. I tried the following dto but I got an error in the service provider : I create 3 classes OneSessionResponseDto, SessionsResponseDto, and WeekResponseDto so I can …