Search In Array of String

I want to search on the below document on basis of data in the label array.

e.g. All Docs with labels contains: “soft_engg”.

[
{
“panel_survey”: {
“completed”: false,
“deleted”: false,
“labels”: [
“soft_engg”,
“english”,
“male”,
“computer”
]
}
}
]

Can someone please help me with this?

CREATE INDEX ix1 ON mybucket(DISTINCT labels);
SELECT * 
FROM mybucket
WHERE ANY v IN labels SATISFIES v = "soft_engg" END;

https://docs.couchbase.com/server/current/n1ql/n1ql-language-reference/indexing-arrays.html

Thanks a lot. Can you help me with the JPA query as well?

Don’t know what is JPA query. Open a separate post, any one can help you.