Skip to content

Tag: object

Rebuilding/Parsing plain JavaScript object

Let’s say I have an object containing objects that have 30 key-value pairs each: My goal is to rebuild this object into something like this: The function below works like charm but I feel like there is a 10x better way to do it. I would love to see your suggestions on how I could improve it. Answer I&#8…

map array of object Restfull API with Hapi

I just learned to use the Hapi nodejs Web Framework. I tried a test to post data in Postman and it worked I wanted to display data like this but I failed and it returned an error and this is so far i got, which part should I fix? I’m having trouble solving it, hope you can help Answer You