Skip to content

Category: Questions

How can you integrate a variable in a JSON path in JavaScript

First of all, it’s connecting to a url and just sanitizing it all in the Front-End. The Hypixel API works so, that you take the api url for the wanted request, in this case api.hypixel.net/player?name=USERNAME&key=APIKEY, and get back a big JSON file, which my code should sanitize. So, if you’…

Data wrong display using @antv/g2plot.js version 2+

I have been trying to use G2plot (https://g2plot.antv.vision/) for a basic line graph. I made some tests a while ago with the 1.28 version and it was working fine. I removed some config that became obsolete and tried the latest version but the display of the graph isn’t the same and looks like something…

Calling 2 props onSLidingComplete in slider

This is my card component. this card i want to call to main component and this is my main component in here i want to call props.getData(value) and props.selectedId but just one of these can be use onSlidingComplete. If someone can help me, its so helpfull to me for finish my project Answer This is what you&#…

owl-carousel not working in mobile device

responsive property doesn’t seem to have an effect. In desktop version it is working fine, but on mobile device it still shows the same number of items as in desktop. Answer Just in case, maybe you did not include responsive meta tag: <meta name=”viewport” content=”width=device-widt…

Flatten objects in array

Hey folks I am getting an array of objects from a response. I need to flatten all of the students objects to simply studentName but not certain how. Any help would be greatly appreciated. Example Array: What I am trying to do: Answer You can create and return a new array of result using map as: