title: Push data to array without index
body: <p>I'd like to know how can i add this</p>
  
  <pre><code>{ post_id: 1, text: "text", creation: "date" }
  </code></pre>
  
  <p>to the "posts" in a array like this</p>
  
  <pre><code> var posts = [
  
      {
          post_id: 5, 
          text: "text", 
          creation: "date"
      },
      {
          group: "favPosts",
          posts: [
                      { post_id: 2, text: "text", creation: "date" }, 
                      { post_id: 7, text: "text", creation: "date" }
                 ]
      },
      {
          post_id: 8, 
          text: "text", 
          creation: "date"
      }
  ]
  </code></pre>
  
  <p>I've already tried searching a hundred times but i can't seem to find a answer that suits my case, I've been trying to insert it with commands like slice and push but i can't seem to get it right, i'm still a beginner in javascript.</p>
  
  <p>PS: I've come a solution but i don't think it's very "efficient";</p>
  
  <pre><code>addToGroup("favPosts");
  
  function addToGroup(group) {
  
      for(id in posts) {
  
          if(posts[id].group == group){
  
              posts[id].posts.push({ post_id: 10, text: "did it", creation: "date" });
  
              console.log(posts[id]);
          }
      }
  }
  </code></pre>