Created setObject for LocalStorage.