How remove a single data which is store in a single key in ionic storage


I am trying to make a note app by ionic where i am using storage plugin. i set a key

  private note: note[] = [
     title: string;
    note: string;
  constructor(private storage: Storage) {


  addNote(note: note) {
    this.note.push(note);'note', this.note);

getNote() {
        (note) => {
            this.note= note== null ? [] : note;
            return this.note.slice();

where all data are array object, like

(3) [Object, Object, Object]

I just want to remove a single array object inside this note array. I tried[index]); but its dont work.


Please make your classes start with capital letters, so you don’t end up with such confusing conflicting-looking things like note: note[].

If this is a common operation, maybe you might want to restructure the data so that each Note gets its own UUID as a key; that way deleting one is easy.

The way you have it now, you’re going to have to read the entire array in, take an element out, and then write the modified array back to storage.