Exchange data bewteen classes

How I exchange data between classes in the same database? I have one class called “Article List” where I store all the articles and in “_User” class I have a column called “User Articles” so when a purchase is done the article in Article list moves to User Articles, but I don’t know how to do that, I tried to do a user.set(“User Articles”, new_article) but that would delete the articles that rhe user had before, thanks for your time.

Hi,
You may want to create another class called “User Articles” that has user and article as columns.

How is that going to solve my problem? I dont see how

Can you describe your problem better then?

I thought that if you create another class, you don’t have to move anything if you would have a column specific to a user.

I want to add content to a column but without removing the content that it already has

and what kind of data has that column?
usually you can do that by reading the previous column data for a particular entry, concatenating the new data and adding the new resulted data as the final value to that entry

The column is an array

Something like this then: https://stackoverflow.com/questions/35517573/appending-data-to-an-array-in-parse-cloud-code ?

Yeah I tried concatetenating using this code:

async function add_random_article(){
let user = await Moralis.User.current();
let random_article = await randon_article();
let attributes = [user[“attributes”][“Articles”] + random_article];
user.set(“Articles”, attributes);
user.save();
}

“Articles” column is an array, and when I do this it only displays other type of data

Yes that is what i am looking for, Thanksss