How to iterate Object of Array to get specific key value pair from JSON object. I am using Couchbase Server. Please suggest N1QL for Couchbase.
Below is my JSON format
{
"A":{
"B":{
"C": {
"D":[
{
"attr":[
{
"Name" : "abc"
}
],
"Name" : "outer"
}
],
"E":[
{
"attr":[
{
"Name" : "xyz"
}
],
"Name" : "outer1"
}
]
}
}
}
}
Want to retrieve value for Name attribute inside each array of object C. Please note there are two fields with same name inside Array , so want to just access outer one. Key value pair inside C is dynamic.
Thanks in Advance!