Doubt on adding new values to existing CO object in Alpha

I have created a custom code trigger in a onclick of a button and inside the code i have a line like this
const response = await alpha.local.get()
here in the response i will get age of the user like response.result.age

how can i add this to CO object can we do something like this

alpha.co.customer_info.age = response.result.age
does this work or is there any better method ??

@Sam @Simphiwe @Eldho

Hello @Aswin ,
Yes, you can do that — just make sure customer_info exists first.
For example:

alpha.co.customer_info = alpha.co.customer_info || {};
alpha.co.customer_info.age = response.result.age;
2 Likes