Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JsltJsonFilter clarification #272

Open
ronMilne opened this issue Sep 29, 2022 · 0 comments
Open

JsltJsonFilter clarification #272

ronMilne opened this issue Sep 29, 2022 · 0 comments

Comments

@ronMilne
Copy link

Can a jslt filter achieve the following?

Given the Json

{
  "clientNames": [
    {
      "type": "Name",
      "clientNameTypeCode": 634,
      "startDate": "2022-09-06",
      "inModeCode": "U"
    }
  ],
  "client": {
    "clientIdentifiers": [
      {
        "identifierTypeCode": 25,
        "identifierStatus": "REGD",
        "identifierStartDate": "2022-09-06"
      },
      {
        "identifierTypeCode": 525,
        "identifierTypeCodeDecode": "Entity",
        "identifierLatestIndicator": "Y",
        "identifierStartDate": "2022-09-06",
        "inModeCode": "I"
      }
    ],
    "clientInternalId": "<<unknown>>",
    "Id": "1d21044e7cd4a593c2046503a09dc653"
  },
  "domain": "clients"
}

I need the tree structure to only include nodes that contain inModeCode and produce the following

{
  "clientNames": [
    {
      "type": "Name",
      "clientNameTypeCode": 634,
      "startDate": "2022-09-06",
      "inModeCode": "U"
    }
  ],
  "client": {
    "clientIdentifiers": [
      {
        "identifierTypeCode": 525,
        "identifierTypeCodeDecode": "Entity",
        "identifierLatestIndicator": "Y",
        "identifierStartDate": "2022-09-06",
        "inModeCode": "I"
      }
    ]
  }
}

Any help in how to achieve this would be greatly appreciated.
Ron.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant