Skip to content

Category: Questions

How can I get the last object in this JSON array?

I’m trying to use player data from a football stats API, but I can’t seem to get data for the current season (which can be found in the last object in the array). For some reason I’m only getting data for the third index (code below). Here is an image of the JSON data I am trying to access. …

Select filter hides all the items in the list

I am trying to create a select dropdown filter which dynamically gets its values and data from rest api. Here is my code HTML JS But for some reason it hides all the items and nothing change after changing the options I want to initially load all the items and then filter based on the option I want the select

Verify if GraalVM is used

due to Nashorn being discontinued we are currently trying to change our (still Java 8) application (very big monolith) from Nashorn to GraalVM. Due to the application being used as library in multiple projects, instead of using the whole GraalVM runtime we decided to just adding the necessary jars to the clas…

Target a child link in a nav menu

I’m creating a dropdown nav for mobile and I’m using an active class to hide and show submenus via CSS. The code below works for the initial list item, but closes the parent as soon I try and open a child list item in the submenu (which uses the same structure and classes) What I think is happenin…

Node.js convert directory tree to JSON

What is expected?: I would like to convert the below listed directory structure into a single JSON file. The directory structure contains JSON files that are supposed to be included in the output file as well. Limitations: Node.js Questions: What would be a good/efficient way to generate the desired output, u…