The performance is similar. The UNNEST version will return multiple results if your custom array contains tag “b01” more than once. For both queries, you can create an index on title, and include title in the WHERE clause.
How do select the element from array that contains escape sequence.
Ex:
{
“REF_DATA”:"[{mtrCd:“A”,shrtMtrDesc:“pam”,longMtrDesc:“pam”,priNbr:“2”,updUserid:“12345”,odsCreateTmstmp:“2019-12-4 18:55:2. 0”,odsUpdTmstmp:“2019-12-4 18:55:2. 0”}}]",
“UPD_TMSTMP”:“16-Dec-2019 05.09.45.203”,
“CREATE_TMSTMP”:“16-Dec-2019 05.09.45.203”
}
With in the string you have array. That is considered as string. It is not an array. You can parse in the application. If you want it as array and perform array operations store it as array.
The array is string, which is encoded json. You can use DECODE_JSON(REF_DATA) which converts encoded JSON into actual JSON. After that you can use array syntax to access any info as described in N1QL Array Functions | Searching in Arrays | Couchbase