Skip to content
Advertisement

Tag: json

table won’t allow me to append more than 2 cells

im trying to append the cells into the table with their data but the table won’t allow me to do it and I need to write it like this because im trying to access specific objects of the json array. any help im new to JAVASCRIPT AND JSON Answer Please stop adding row and cells with createElement() method…!

Fill the empty values in my JSON (not null or “”)

I have a raw data that looks like that : I need to fill those empty values to be able to use it as an object. It’s not me who create it, I got it from an external source. I know how to fill those empty values if they were like “” or null. Sometime there is a coma after

Mapping in map in json response

I need to parse json api response, with response.data equals: and I need to return one array[String] with all subcategories, ex [“web-development”, “backend-development” … “3D modeling”] All that I did is: and it returns Array of arrays with categories. Im sure, that there near a better and easier way. Thanks! Answer Try using Array flatMap

Filtering arrays in JS/React

So here I have search functionality. Everything works fine except when an Item has not been found in the array. I have tried something with objects.Keys but it is displaying it on the render not when the Book has not been found like it should. Should I use if statement or. Answer You’re filtering the category names instead of the

query mongoDb to substract timestamp

I want a query to subtract day from a Date. I test this: {“lastSeen”: { “$gte”: {“$date”: { $subtract: [ “$date”, 1616000000 ] }}}} But doesn’t work. I have this error on Gamesparks. Error parsing JSON. Please use valid JSON, including double-quotes on object keys. Any ideas. Thank you. Answer As this is a JSON file, you will need to

Advertisement