In Couchbase, how do you change the datatype of an attribute from String to Array?

I’m having a difficulty. I want to modify an attribute’s data type from String to Array.
{
“id”: “trn:tarb:tradingpartner:uuid:00000464-fa72-49fe-b050-c4bf1cfd8259”,
“partnerNumber”: “1098981”,
“partnerName”: "AFLO ",
“currencyCode”: “GBP”,
“commercialPartnerStatus”: “Inactive”,
“source”: {
“id”: “STV0001$$”,
“name”: “QS”
},
“corpCode”: “DR”,
“subCorpCode”: “001”,
“targetMarket”: “UK”
}
In the preceding one, I want to convert targetMarket from String to Array without affecting its name.
“targetMarket”:[
“UK”,
“IN”
]
The issue is with the old data, which is in string format, and if I alter the attribute in java, I receive an error while retrieving data from the database. It cannot automatically cast from string to arrayList. As a result, I must first modify the old data before changing the java code. It’s good with me if the data is null or erased after transforming the object from string to array.
Popular Backend topics

Just done a fresh install of macOS Big Sur and on installing Erlang I am getting:
asdf install erlang 23.1.2
Configure failed.
checking ...
New

Ruby on Rails v6.1.0 has been released.
Link: Release 6.1.0 · rails/rails · GitHub
New

If you are experiencing Rails console using 100% CPU on your dev machine, then updating your development and test gems might fix the issu...
New

Can Phoenix LiveView be used in multi-page applications, unlike React/Vue/Blazor which seems to be targeted for SPA?
New

This hands-on book will quickly get you building, querying, and comparing graph data models using a robust, concurrent programming langua...
New

I have being some Elixir open-source contributions and side projects. Oh, and I’m doing them on livestreams on my twitch channel, follow ...
New

Deep Learning with Python, Second Edition is a comprehensive introduction to the field of deep learning using Python and the powerful Ker...
New

This is going to be a long an frequently posted thread.
While talking to a friend of mine who has taken data structure and algorithm cou...
New

Hello,
I am. very new to Elixir lang I have only been doing it for about 2 weeks. I recently started following this tutorial todo list, ...
New

Laravel v10.0.5 has been released.
Link: Release v10.0.5 · laravel/laravel · GitHub
New
Other popular topics

We have a thread about the keyboards we have, but what about nice keyboards we come across that we want? If you have seen any that look n...
New

Here’s our thread for the Keyboardio Atreus. It is a mechanical keyboard based on and a slight update of the original Atreus (Keyboardio ...
New

Just done a fresh install of macOS Big Sur and on installing Erlang I am getting:
asdf install erlang 23.1.2
Configure failed.
checking ...
New

“Finding the Boundaries” Hero’s Journey with Noel Rappin @noelrappin
Even when you’re ultimately right about what the future ho...
New

Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New

Hello everyone! This thread is to tell you about what authors from The Pragmatic Bookshelf are writing on Medium.
New

Here’s the story how one of the world’s first production deployments of LiveView came to be - and how trying to improve it almost caused ...
New

Saw this on TikTok of all places! :lol:
Anyone heard of them before?
Lite:
New

The File System Access API with Origin Private File System.
WebKit supports new API that makes it possible for web apps to create, open,...
New

I am trying to crate a game for the Nintendo switch, I wanted to use Java as I am comfortable with that programming language. Can you use...
New
Latest in Backend
Latest (all)
Categories:
My Saved Portals
-
None saved yet
Popular Portals
- /elixir
- /opensuse
- /rust
- /kotlin
- /ruby
- /erlang
- /python
- /clojure
- /react
- /quarkus
- /go
- /vapor
- /v
- /react-native
- /wasm
- /security
- /django
- /nodejs
- /centos
- /haskell
- /rails
- /fable
- /gleam
- /swift
- /js
- /deno
- /assemblyscript
- /tailwind
- /laravel
- /symfony
- /phoenix
- /crystal
- /typescript
- /debian
- /adonisjs
- /julia
- /arch-linux
- /svelte
- /spring
- /preact
- /flutter
- /c-plus-plus
- /actix
- /java
- /angular
- /ocaml
- /zig
- /kubuntu
- /scala
- /zotonic
- /vim
- /rocky
- /lisp
- /html
- /keyboards
- /nim
- /vuejs
- /emacs
- /elm
- /nerves