title: Delete data from json array
body: <p>I am trying to remove a piece of a data from a json array. For example I have this array</p>
  
  <pre><code>var favorites =    {
          "userID": "12345678",
          "favorites": [
  
              {   "name" : "My Favorites",
                  "id" : "87654321",
                  "items": 
                  [
                      { 
                          "productID": "11234567",
                          "added": "TIMESTAMP",
                          "title": "Project",
                          "type": "Weekend Project",
                          "imageURL": "1"
                      },
  
                      { 
                          "productID": "11223456",
                          "added": "TIMESTAMP",
                          "title": "Bathroom",
                          "type": "Weekend Project",
                          "imageURL": "2"
                      },
  
                      { 
                          "productID": "11223345",
                          "added": "TIMESTAMP",
                          "title": "Curves",
                          "type": "Collections",
                          "imageURL": "3"
                      }
                  ]
              },
              {   "name" : "Bathroom",
              "id" : "87654323",
              "items": 
              [
                  { 
                      "productID": "11122224",
                      "added": "TIMESTAMP",
                      "title": "Project",
                      "type": "Weekend Project",
                      "imageURL": "1"
                  },
  
                  { 
                      "productID": "11122222",
                      "added": "TIMESTAMP",
                      "title": "Room",
                      "type": "Weekend Project",
                      "imageURL": "2"
                  },
  
                  { 
                      "productID": "11112222",
                      "added": "TIMESTAMP",
                      "title": "Strais",
                      "type": "Collections",
                      "imageURL": "3"
                  },
  
                  { 
                      "productID": "11111222",
                      "added": "TIMESTAMP",
                      "title": "Door",
                      "type": "Collections",
                      "imageURL": "4"
                  }
              ]
          }
          ]
      } 
  </code></pre>
  
  <p>Say I wanted to remove the a product out of the bathroom category on the click of a button. How would I acheive this?</p>
  
  <p>I have been trying this to no avail:</p>
  
  <pre><code>jQuery(document).on('click', ".removeFav", function() {
      favorites.favorites[1].items[1].splice();
  }
  </code></pre>
  
  <p>error I am receiving:</p>
  
  <blockquote>
    <p>Uncaught TypeError: Object # has no method 'splice'</p>
  </blockquote>