When adding comments to a blog post using the line:
blogpost.comments.push({ username: "fred", comment: "Great"});
The JSON structure of the comments section will look like this:
"comments":[{"0":{"username":"jim","comment":"Good",},"1":{"username":"fred","comment":"great"}}]
To have a flatter JSON format without numerical additions, it should be structured as follows:
"comments":[{"username":"jim","comment":"Good"},{"username":"fred","comment":"great"}]
What changes are needed to achieve this desired JSON format?