Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-31583

Ability give object full path

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 7.1.0
    • 6.5.0, 7.0.0, 7.1.0
    • query
    • None

    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": ""
      }
      ]
      }
      

      https://stackoverflow.com/questions/52708425/finding-property-in-an-object-and-returning-full-path/52717471#52717471

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Donald.haggart Donald Haggart
              Sitaram.Vemulapalli Sitaram Vemulapalli
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty