-2

I am new to NodeJS so please excuse for this dumb question.

I receive a big JSON object in my NodeJS Service which I want to parse and make a new object which has some less properties from the original object. How can i do it in Node JS ?

3
  • 2
    Being new to programming is not a problem. Not doing any research is a problem. This question (probably with exactly the same title) has been asked before. Hundreds, if not thousands of times. Commented Aug 9, 2017 at 6:36
  • Possible duplicate of Updating a JSON object using Javascript Commented Aug 9, 2017 at 6:40
  • Start with a basic search for "parse JSON object", write some code based on that, then come back here when you have some code and you got stuck on one of your other points. We don't just write entire tutorials here for someone who shows no evidence of doing any homework or trying anything themselves. That's not what we're best at here. Do your research, try some things, then post when you code and a specific question about that code. Commented Aug 9, 2017 at 6:57

1 Answer 1

0

For example you got this object:

{
  "name": "Felix"
}

Just do:

const object = JSON.parse(thatObject);
// Then you will have access to that object key and values
console.log(object.name) // Felix
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.