I am trying to get the details of the the movie using tmdb api so fall everything was good until i tried to display all the genres of that movie This is what i tried but its only showing one genre And can anyone help me simplify the code what i tried Answer You are getting only one genre because
Sending an otp to the input mobile number and verifying it, in my html page
I want my html page to send an OTP to the mobile number given in the input text, when I press Send OTP button. And upon giving the OTP as input I want my webpage to verify whether it’s the same OTP …
Image on load function in jQuery
I have pictures on the site I want to do (If the image has been downloaded, delete p) But I was surprised that ‘load’ has been removed from the new jQuery version Answer Your code works. I used JQuery Version 3.6.0 If you want just a special p to remove give the image an id That’s it. So inc…
Javascript create nested Keys from Values under eachother & save to a new .json file
I have been racking my head to solve this. Assuming we have the below CSV what i am trying to do is create the nested json, which is not working in addition to that to get the below in a new json file, named with the value of col1. meaning grouping all rows with a common col1 in a single
Line graph with linear timescale in Chart.js
I’m trying to use Chart.js 3.3.2 to display some a line graph with an equally spaced x date axis. Like the example they give here. I cannot get a simple version of this example working (see below snippet) as it outputs the error: Error: This method is not implemented: Check that a complete date adapter …
Timed Mute Command ‘UnhandledPromiseRejectionWarning: DiscordAPIError: Unknown Role’ error
I’m making a timed mute command, but i get a lot of errors, the principal one being : Here is the bugged code : The problem comes from the fact that I get all roles from the user, store it and then give it back. I don’t know if there is any other way to do it but that’s what
How to display on/off value for the power button in console?
I have written the code for neumorphism power button and it is working perfectly fine but I’m not able to figure out how to display the status in the console using javascript, i.e., if the power button is on or off. HTML code: CSS Code: Answer Add a change event listener to the power button, then check …
compare 2d array against another 2d array by checking arrays with same elements
Have a 2d array (Arr1) and not able to get a check/compare against another 2d array (Arr2) to count arrays what match with exact elements. for example: Return should be true, false, true or just 1, 0, 1, so in the end can count amount of true or 1, expected outcome: true===2 Any good way to do that without us…
Is it possible to convert a buffer to base64string in populate mongoose?
I have a mongoose Image Schema as below: and a Chapter schema I’ll do population for the image and I’m trying to convert the buffer to base64string for every single image in the chapter. Could anyone please help me? is there a way to do conversion on populate function in mongoose? or I have to map…
How can I access multiply nested sub objects in javascript?
I have a larger code which handles and sorts data. In it I want to work with objects to keep it easier and better structured. I have multiple categories and all of them have different nested subobjects, which I have trouble accessing writing/reading. I searched on the web, w3schools but couldn’t find my…