How to update array in couchbase using n1ql query

“subjects” : [{
“classes” : “12”
“classes” : “9”
“id” : “12345”
I want to add another set of subjects using update query. i tired to put some query by seeing some website but it show error and i am unable to understand. It will be more helpful if you give suggestion and thanks for the help. the query which i tired was :- [update studapp ARRAY “networks”, a.tutor= “shalin” ,a.classes= “8” FOR a IN subjects END where id = ‘12345’;]


Its a lot late reply , but i found the answer and implemented it and its working very well .
Correct answer Which I worked : =

UPDATE dbname SET subjects = ARRAY_APPEND (subjects, { “name”:“networks” , “tutor”:“shalin”, classes":“8”}) WHERE id = ‘12345’ and emailId = ‘’ ;