JavaScript performing CRUD on a JSON object similar to CRUD on a SQL table