How to update array in couchbase using n1ql query

{
“name”:“nick”,
“emailId”:"nick123@gmail.com",
“subjects” : [{
“name”:“SOA”,
“tutor”:“roshan”,
“classes” : “12”
},
{
“name”:“UNIX”,
“tutor”:“mathew”,
“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 a.name= “networks”, a.tutor= “shalin” ,a.classes= “8” FOR a IN subjects END where id = ‘12345’;]

See http://stackoverflow.com/questions/42344558/how-to-update-array-in-couchbase-using-n1ql-query/42346765#42346765

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 = ‘nick123@gmail.com’ ;