N1QL Access different indices of Array in JSON

I have a bucket of JSON documents. They are heterogenous documents with different items. Each document is an array with different objects. I need to select all objects of the array that satisfied certain criteria. I realize that you defined "OVER" keyword to iterate the collections. But I am not able to use it in my exercise and I only get the results when I specifically define the index.

SELECT *
FROM newtest_bucket.`array`[4] As g Where `myfield` IS Not MISSING
If I dont define [4], I will not get any results. Even when I try "OVER"

Really appreciate your comments.

Thanks

1 Answer

« Back to question.

Hello Neda,

Please post the results of the following:

SELECT VALUE() FROM newest_bucket LIMIT 5