Skip to content

loop through array issue

I am calling an API that returns an array, i am trying to loop through the array but console is saying that the lenght is 0, never seen anything like it before and can not find out what is the issue here: getUserNFTs function, I just console logged the last forEach, it is loging it after it is logged on

Transform JSON into required format

Here is my input JSON I need to transform json w.r.t parent category and what ever child json elements w.r.t parent to be in one format. All should be dynamic no hard coding comparing with strings. Need to transform my input json to below sampleformat, I tried separating parents and child values in an array a…

Querying MarkLogic merged collection

I’m trying to write a query to get the unique values of an attribute from the final merged collection(sm-Survey-merged). Something like: I get a tree-cache error with the below equivalent JS query. Can someone help me with a better query? Answer If there are a lot of documents, and you attempt to read t…

Changing Values in a Form Causes Lag

I want to change the value of a from once a second, but when i use this code: The tab completely locks up, and I am forced to reload it. I have also tried using document.getElementById(“input”).value = “value”;, but that causes the same thing to happen. Does anyone know how to fix this…

Circular movement when user input left/right arrow

I am trying to achieve left/right circular movement inside my main circle. I have class Circle and Ball. Circle is responsible for drawing a “circle” where I am placing my Ball, that is moving inside. For now I am inputing left right arrow press and i do want my ball to change direction based on a…