Skip to content
Advertisement

Tag: json

List of list from flask to JS

My Python code calculate coordonates of devices and put it in a list. So i get a list of list in a python var my_devices_list = [ [“name1”, 11.1, 22.2] , [“name2”, 33.3, 44.4] ] i’m trying to pass this list to my JS code my python code : my JS code : the alert I get from the JS

creating alt tags for images gotten through JSON

This web page has three cards with information above and an image below. I am using JavaScript and HTML to get the information that goes to my web page. My JavaScript gets the information it needs from the following online JSON file. The file doesn’t contain alt text for the image. when I run the Wave evaluation tool, it says

editing a JSON in JS and putting it in an array

so I have the following json. I need to remove the items that don’t have a value in the “available” field (such as NEO and ETH and set the result in an array. Then remove the onOrder and btcTotal fields. such as: BTC 0.00024868 0.00024868 BNB 0.8943066 0.0004663808919 I am writing my little project in JS on NodeJS as a

how do i copy an array correctly

im trying to make a copy of an array but when i change the copy it also changes the original. i have tried using Object.assign([], scenes), scenes.clone() and tried using a for loop Answer You can also try const arrayCopy = JSON.parse(JSON.stringify(initialArray)), although the method using the spread operator should work as well.

Find the point where maximum intervals overlap for certain interval length

I’m trying to maximize attendance to a event given a list of busy times for each person. The event can be scheduled anytime between a certain date and hours (Ex. March 1st to March 8th from 9-5) and that attendance is maximized. So far I’ve tried using a sliding window approach, and a counting approach described here (https://www.geeksforgeeks.org/find-the-point-where-maximum-intervals-overlap/) however I

How to append data to request form.submit()

I am trying to submit a form using POST, but I have some additional data from <p> tags that I have stored into JS object. I want to send that to server when I hit form.submit() from JavaScript. What I am trying to do is to send data with submit event Answer You could attach an onclick handler to the

Advertisement