Description
Let me start off with i have searched but could not find an answer specific to what i am looking for. I have Docs which are stored in a NSQL db like mango or couchbase and those docs have a an object which in turn can hold another object or and array of objects. each opject in the Doc has a unique GUID and i want to be able to find the guid and return the complete path back. I have had success doing so if i hardcore the search path for the guid where to look but i am hoping there is a way to do so without predefined path and sub level limitation.
here is a sample
{
|
"type": "lead", |
"id": "4416e4cc-89df-4537-b86f-a417614ebe10", |
"contact": [ |
{
|
"type": "contact", |
"id": "4416e4cc-89df-4537-b86f-a417614ebe11", |
"dob": "07/12/1978", |
"email": [ |
{
|
"default": "yes", |
"email_address": "email1@email.com", |
"type": "home", |
"id": "4416e4cc-89df-4537-b86f-a417614ebe12" |
},
|
{
|
"default": "no", |
"email_address": "email2@email.com", |
"type": "work", |
"id": "4416e4cc-89df-4537-b86f-a417614ebe13", |
"note": [ |
{
|
"id": "4416e4cc-89df-4537-b86f-a417614ebe73", |
"type": "note", |
"3rdLevel": [ |
{
|
"id": "4416e4cc-89df-4537-b86f-a417614ebe77", |
"type": "thirdLevel" |
}
|
]
|
}
|
]
|
}
|
],
|
"first_name": "Susi", |
"gender": "f", |
"last_name": "Smith", |
"middle_name": "M", |
"suffix": "I", |
"title": "" |
},
|
{
|
"type": "contact", |
"id": "4416e4cc-89df-4537-b86f-a417614ebe10", |
"dob": "07/12/1978", |
"email": [ |
{
|
"default": "yes", |
"email_address": "email1@email.com", |
"type": "home", |
"id": "4416e4cc-89df-4537-b86f-a417614ebe22" |
},
|
{
|
"default": "no", |
"email_address": "email2@email.com", |
"type": "work", |
"id": "4416e4cc-89df-4537-b86f-a417614ebe23" |
}
|
],
|
"first_name": "Susi", |
"gender": "f", |
"last_name": "Smith", |
"middle_name": "M", |
"suffix": "I", |
"title": "" |
},
|
{
|
"type": "contact", |
"id": "4416e4cc-89df-4537-b86f-a417614ebe09", |
"dob": "07/12/1978", |
"email": [ |
{
|
"default": "yes", |
"email_address": "email1@email.com", |
"type": "home", |
"id": "4416e4cc-89df-4537-b86f-a417614ebe32" |
},
|
{
|
"default": "no", |
"email_address": "email2@email.com", |
"type": "work", |
"id": "4416e4cc-89df-4537-b86f-a417614ebe33" |
}
|
],
|
"first_name": "Susi", |
"gender": "f", |
"last_name": "Smith", |
"middle_name": "M", |
"suffix": "I", |
"title": "" |
},
|
{
|
"type": "contact", |
"id": "4416e4cc-89df-4537-b86f-a417614ebe08", |
"dob": "07/12/1978", |
"email": [ |
{
|
"default": "yes", |
"email_address": "email1@email.com", |
"type": "home", |
"id": "4416e4cc-89df-4537-b86f-a417614ebe42" |
},
|
{
|
"default": "no", |
"email_address": "email2@email.com", |
"type": "work", |
"id": "4416e4cc-89df-4537-b86f-a417614ebe43" |
}
|
],
|
"first_name": "Susi", |
"gender": "f", |
"last_name": "Smith", |
"middle_name": "M", |
"suffix": "I", |
"title": "" |
}
|
]
|
}
|
Attachments
Issue Links
- relates to
-
MB-43890 N1QL: Provide OBJECT_PAIRS_NESTED to get arbitrary field names
- Resolved
- links to